InputValidationResult
InputValidationResult is the return type used by shared-input validators.
Allowed Results
truewhen the submitted value is valid- a
stringerror message when the value is invalid
Example
ts
const result: boolean | string = value.includes('@')
? true
: 'Please enter a valid email address.';