Cross Field Validation
Validation rules that span multiple form fields (e.g. password-confirm match, date-range overlap, conditional required fields) must run on form submission rather than per-field blur, and surface a grouped error summary a…
$ prime install @community/rule-cross-field-validation Projection
Always in _index.xml · the agent never has to ask for this.
CrossFieldValidation [rule] v1.0.0
Validation rules that span multiple form fields (e.g. password-confirm match, date-range overlap, conditional required fields) must run on form submission rather than per-field blur, and surface a grouped error summary at the top of the form.
Loaded when retrieval picks the atom as adjacent / supporting.
CrossFieldValidation [rule] v1.0.0
Validation rules that span multiple form fields (e.g. password-confirm match, date-range overlap, conditional required fields) must run on form submission rather than per-field blur, and surface a grouped error summary at the top of the form.
Applies To
@community/type-html-artifact
Severity
warning
Behavior
- Per-field format errors (email pattern, required) fire on blur.
- Cross-field logical errors (confirm match, date range, conditional required) fire only on submit.
- On submit failure: render an error summary before the first field, focused automatically, listing each error as a link to its field.
- Each affected input also receives aria-invalid='true' and aria-describedby pointing to its individual error message.
Loaded when retrieval picks the atom as a focal / direct hit.
CrossFieldValidation [rule] v1.0.0
Validation rules that span multiple form fields (e.g. password-confirm match, date-range overlap, conditional required fields) must run on form submission rather than per-field blur, and surface a grouped error summary at the top of the form.
Applies To
@community/type-html-artifact
Severity
warning
Behavior
- Per-field format errors (email pattern, required) fire on blur.
- Cross-field logical errors (confirm match, date range, conditional required) fire only on submit.
- On submit failure: render an error summary before the first field, focused automatically, listing each error as a link to its field.
- Each affected input also receives aria-invalid='true' and aria-describedby pointing to its individual error message.
Rationale
Firing cross-field checks on blur creates false positives: 'Password does not match' appears on the first password field before the user has even reached the confirm field. Defer until submit to check relational constraints; then surface them in two places so screen-reader users and sighted users both discover all errors.
Applies To
@community/type-html-artifact
Severity
warning
Behavior
- Per-field format errors (email pattern, required) fire on blur.
- Cross-field logical errors (confirm match, date range, conditional required) fire only on submit.
- On submit failure: render an error summary before the first field, focused automatically, listing each error as a link to its field.
- Each affected input also receives aria-invalid='true' and aria-describedby pointing to its individual error message.
Source
prime-system/examples/frontend-design/primes/compiled/@community/rule-cross-field-validation/atom.yaml