Wit Form
Validation

Cross-field Rules

The new password can't match the current one, and the confirmation must match the new password. Change the new password after confirming it and the confirmation re-validates.

  • ○ At least 8 characters
  • ○ An uppercase letter
  • ○ A number

What this shows

Fields listed in depFields arrive in the validator's second argument as other.values, and the field re-validates whenever they change.

  • The confirmation re-validates when the new password changes.
  • PasswordChecklist uses useFieldWatch to follow one field without re-rendering the form.
  • reinitializeOnSubmit clears the form after a successful submit.

On this page