You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/guide/forms.ngdoc
+39
Original file line number
Diff line number
Diff line change
@@ -365,6 +365,45 @@ In the following example we create two directives:
365
365
</file>
366
366
</example>
367
367
368
+
# Modifying built-in validators
369
+
370
+
Since Angular itself uses `$validators`, you can easily replace or remove built-in validators, should you find it necessary. For example, if you think the email regex isn't strict enough, the following example shows you how to override it. Note that you can alternatively use `ng-pattern` to further restrict the validation.
# Implementing custom form controls (using `ngModel`)
370
409
Angular implements all of the basic HTML form controls ({@link ng.directive:input input}, {@link ng.directive:select select}, {@link ng.directive:textarea textarea}), which should be sufficient for most cases.
0 commit comments