Skip to content

Replace jQuery validate in book/author/tag edit forms #9608

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

Conversation

rebecca-shoptaw
Copy link
Collaborator

@rebecca-shoptaw rebecca-shoptaw commented Jul 22, 2024

Subtask of #9605.

Feature. Replaces jQuery validate required field and email validation with built-in HTML validation to improve performance, JS-disabled functionality, and internationalization.

Technical

Quite simple! Just removed the validate class (which triggers the plugin), and replaced each class="required" with the HTML required attribute and each class="email" with the HTML type="email" attribute.

Testing

  1. Go to one of the relevant forms, i.e. a book edit form
  2. Enter a badly formatted email and/or leave a required field blank, hit submit
  3. The submission should fail and you should see an HTML-native error message

Screenshot

Stakeholders

@cdrini

Copy link
Collaborator

@jimchamp jimchamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rebecca-shoptaw! Turns out the the Tag validations weren't even working, so this is a great help.

@jimchamp jimchamp merged commit 1a6fde9 into internetarchive:master Aug 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants