getFieldError
getFieldError(
error,fieldName):string|undefined
Defined in: react/src/validation.ts:110
Gets error message for a specific field from a ValidationError. Returns undefined if no error exists for that field.
Parameters
Section titled “Parameters”fieldName
Section titled “fieldName”string
Returns
Section titled “Returns”string | undefined
Example
Section titled “Example”if (isValidationError(error)) { const toError = getFieldError(error, "to") const amountError = getFieldError(error, "amount")}