Skip to content
Design System
  • Home
  • Settings
  • Styles
  • Layouts
  • Components
  • Scripts
  • Templates
  • Avatars
  • Buttons
  • Forms
  • Forms: errors
  • Forms: validation
  • Hide and show items inclusively
  • Links
  • Lists
  • SVG icons
  • SVG images
  • Tables
  • Typography
  • Utilities
  • Vertical spacing

Forms: validation

The best practice is to validate a form on submission. It is recommended to avoid default HTML5 form validation. To turn this off, add the novalidate attribute to the <form> element.

Visit the GOV.UK Design system for more advice about form validation.

¶Client side validation

If client side validation is required, here are some suggested JavaScript libraries:

  • Parsley
  • PristineJS

Alternatively, you could roll your own thanks to Chris Ferdinandi's series on form validation.

Copyright © 2025 W3C - generated 10 Jan 2025, 12:43:28 UTC

Feedback is welcome and can be submitted as a GitHub issue.