Skip to content

Commit 3b9d708

Browse files
committed
A note on odd custom error outlined in #633
1 parent 6ad4173 commit 3b9d708

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,9 @@ or Schema Form does not support it (yet), like `anyOf` and `oneOf`.
346346
Other times you really need to ask the backend, maybe to check that the a username is not already
347347
taken or some other constraint that only the backend can know about.
348348
349+
### NOTE: Odd default behaviour in ngModelOptions
350+
Once an individual field is edited, if it is invalid your error should appear, however then validating the whole form can no longer display your message. This is due to a feature of ngModelController where it doesn't add invalid fields to your model, if this is not the behaviour you wish to see, you can change it by adding `ng-model-options="{ allowInvalid: true }"` to your form.
351+
349352
### Inject errors into form aka backend validation
350353
To support validation outside of the form, most commonly on the backend, schema form lets you
351354
injecting arbitrary validationMessages to any field and setting it's validity.

0 commit comments

Comments
 (0)