-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade/36-crispy-forms-gds #39
Upgrade/36-crispy-forms-gds #39
Conversation
(I'm just fixing the failing tests now) |
For the failure here, it looks like the issue is linebreaks in the wrong place in the fixture (this line and this line). I would compare what's returned by It's one of the cumbersome things about this project that we are testing against so many html fixtures. Maybe Django provides a way to do less-whitespace-sensitive comparison of html? |
6d951f5
to
b213f92
Compare
raise ValidationError(str(e)) from e | ||
else: | ||
return None | ||
if len(data_list) == 3: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens when one passes just one or two instead of all 3 or no values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Along with the changes that #29 adds, in both cases:
- if
required=False
: nothing - if
required=True
and only one value is passed: separateValidationError
s are raised for each individual field that's missing (e.g. "Please enter a month" and "Please enter a year" if only the day is provided) - if
required=True
and no values are passed: separateValidationError
s are raised for each individual field (e.g. "Please enter a month")
It's probably easier to look at the release branch for this with all of the changes combined: https://github.com/torchbox/tbxforms/pull/52/files#diff-e737fc521b5da51cd98b30ac80c551f4891fc4949dbf297f4da8b26b84490de1
This work has been merged as part of #52 (it was easier to do within an integration branch due to so many related changes) |
The following merged PRs to crispy-forms-gds can be pulled into our package:
Raise ValuationError if invalid date entered in DateInputField wildfish/crispy-forms-gds#59
Display dividers between checkbox choices wildfish/crispy-forms-gds#76:
- we will need to check the CSS class name for the divider markup
- see https://design-system.service.gov.uk/components/radios/ - the divider should be used to separate answers that are conceptually different