-
Notifications
You must be signed in to change notification settings - Fork 19
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
Sets form to no-validate, so we can use Drupal validation instead #800
Conversation
Would we be able to put this behind a setting / config option? Be useful to introduce gradually to test. |
Also I think this might be better in localgov_core? |
I tested and it works well, in that I get the Drupal validation errors and it makes a lot more sense. I'll need to check BHCC code to see if we are dependant on html5 validation anywhere. |
I wonder would it make sense as a theme setting? Or do we want it in a module to disable HTML5 validation everywhere? |
@andybroomfield [in the distant past, you commented](See: localgovdrupal/localgov_base#367 (comment)
I see that the GDS guidelines specifically say "Turn off HTML5 validation." So I agree with your previous comment and think we should merge this and roll out better validation by default. What's the argument for making it optional? If it really needs to be optional, we can use https://www.drupal.org/project/disable_html5_validation and install by default, allowing people to uninstall if desired. |
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.
I think we should go with this and happy to approve, but @andybroomfield I'd like you to be OK with this too.
Sorry, only just spotted the PHP static analysis failure, so just added a commit to address that. |
All test pass now too :) |
@millnut Quick question: are hooks (like this one) still OK in the .profile file or do we want to move them to a module? |
I agree with @andybroomfield this should probably live in |
I have created the same PR in localgov_core now so we can merge that one instead if we are in agreement. |
Thanks @markconroy Closing this one in favour of localgovdrupal/localgov_core#267 |
Closes #503
What does this change?
HTML 5 validation is not very good. Drupal's form validation is much better.
This simply removes HTML 5 validation from forms - same approach as Disable HTML5 Validation module - so Drupal's form validation can take over instead.
Before:
After: