-
Notifications
You must be signed in to change notification settings - Fork 27.4k
docs(guide/Forms): clarify ngModel behavior for validation #9866
Conversation
@@ -56,6 +56,9 @@ for other directives to augment its behavior. | |||
|
|||
Note that `novalidate` is used to disable browser's native form validation. | |||
|
|||
The value of `ngModel` won't be set unless it passes validation for the input field. | |||
For example: inputs of type `email` must have the form `x@y`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe must have a value in the form "user@domain"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea makes more sense
Ok changed the wording. Also is there a way to edit the last commit using github's web interface? I've been doing a rebase and then |
nah, the web interface sucks :( |
anyways looks good to me |
@@ -56,6 +56,9 @@ for other directives to augment its behavior. | |||
|
|||
Note that `novalidate` is used to disable browser's native form validation. | |||
|
|||
The value of `ngModel` won't be set unless it passes validation for the input field. | |||
For example: inputs of type `email` must have a value in the form of `user@domain`. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be a good idea to mention that this default behaviour can be overriden via ngModelOptions
' allowInvalid
.
For #9861