Component to wrap form fields with built-in error messaging
HTML React Angular
globalErrorDescription
| |
|---|
| Attribute | global-error-description |
| Type | string |
| Default | DEFAULT_GLOBAL_ERROR_DESCRIPTION |
| Required | false |
| Description | Body of error banner |
globalErrorHeadline
| |
|---|
| Attribute | global-error-headline |
| Type | string |
| Default | DEFAULT_GLOBAL_ERROR_HEADLINE |
| Required | false |
| Description | Headline of error banner |
preventDefault
| |
|---|
| Attribute | prevent-default |
| Type | boolean |
| Default | false |
| Required | false |
| Description | Stop default form submission behavior. Necessary for server validation and custom form submission behavior via javascript |
showGlobalError
| |
|---|
| Attribute | show-global-error |
| Type | boolean |
| Default | true |
| Required | false |
| Description | Option to disable error banner |
| Name | Description | Bubbles |
|---|
certaraCustomValidate | Emitted when field-level errors are applied programmatically (e.g. via setInputErrors); detail carries the errors map keyed by input name. | true |
certaraSubmit | Emitted when the form passes constraint validation on submit; detail contains the underlying HTMLFormElement. | true |
certaraValidate | Emitted when submit is attempted but the form fails constraint validation, so child inputs can show or hide error messages. | true |
| Name | Signature | Description |
|---|
setGlobalError | (headline: string, description: string) => Promise<void> | Method to programatically set the global error. Useful for passing global errors for server validation |
setInputErrors | (errors: ErrorObj) => Promise<void> | Method to pass errors down to inputs in the form. The errors object schema should be { formInputName: ‘error message’ } |
setIsInvalid | (isInvalid: boolean) => Promise<void> | Method to programatically set the invalidity state of the form. Useful for dealing with server side form validation. |
There are no slots available for this component