Skip to content

Commit

Permalink
Update docs for @ignoreNativeValidation
Browse files Browse the repository at this point in the history
  • Loading branch information
simonihmig committed Mar 13, 2023
1 parent 6b5296d commit a1827c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/validation/native.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ In the following example, we use an `email` typed input and applied `required` a
```

> Note that the validation messages are generated by the browser, so they are dependent on the browser itself **and** the operating system's locale. Unfortunately there is no easy way to customize them or to force a specific locale (like the page's locale instead).
In case you have also provided [custom validations](./custom-validation.md) via the `@validate` argument, the validation errors from all sources including the native ones will be merged together. So you can have basic validations like setting `required` using native validations and add additional ones on top that are not possible otherwise using custom validation functions or the related adapter packages like [ember-changeset](./ember-changeset.md) or [yup](yup.md).

There can be cases however where this mix of validation sources is not desirable, like when your custom validations already cover the simple `required` checks. In this case you can opt-out of native validation by passing `@ignoreNativeValidation={{true}}` to the `<HeadlessForm>` component!

0 comments on commit a1827c0

Please sign in to comment.