Registration Form

Builds on the login form with more field types, cross-field validation, and a checkbox for terms acceptance.

Preview & Code

Preview
Code
Username *
Email *
Role
Password *
Confirm Password *
Bio
Tell us a bit about yourself (optional)

How it works

Multiple field typestext, longText, and checkbox all registered in the same fieldMapping. The config declares which type each field uses.

select fieldoptions is passed via props, typed against SelectField's prop interface.

Cross-field validationpassword_confirm uses validate in rules to compare against the current form value via getValues:

rules: {
  validate: (value, formValues) => 
    value === formValues.password || "Passwords do not match"
}

checkbox as a required fieldrules.required works on checkboxes the same as text inputs. An unchecked box is treated as false, which fails the required check.

disabled as a functionpassword_confirm is disabled until password has a value, using disabled: (values) => !values.password.