Workflow Development

Build a Form

End-to-end workflow for building and validating a form

formsfrontendvalidation
CLAUDE.md

When building a form:

  1. Define the form fields, their types, and validation rules.
  2. Create the form component with controlled inputs and labels.
  3. Add client-side validation with clear, specific error messages per field.
  4. Add a submit handler that disables the button during submission and shows a loading state.
  5. Handle the API response: show a success message or display server-side errors mapped to the correct fields.
  6. Test with valid data, empty fields, invalid formats, and rapid double-submission.
  7. Verify keyboard navigation: Tab through all fields, submit with Enter.

Copy this workflow into your CLAUDE.md or agent config file so your agent follows this process automatically.

get crystl