docs(aio): correct some minor typos in the form validation cookbook (#16068)
This commit is contained in:
parent
7520ddcf40
commit
7a8bd99ab1
|
@ -530,7 +530,7 @@ The optional second value is a validator function or an array of validator funct
|
|||
Most of the validator functions are stock validators provided by Angular as static methods of the `Validators` class.
|
||||
Angular has stock validators that correspond to the standard HTML validation attributes.
|
||||
|
||||
The `forbiddenNames` validator on the `"name"` control is a custom validator,
|
||||
The `forbiddenName` validator on the `"name"` control is a custom validator,
|
||||
discussed in a separate [section below](guide/form-validation#custom-validation).
|
||||
|
||||
|
||||
|
@ -626,11 +626,11 @@ and to compare all of the files in this cookbook sample.
|
|||
|
||||
|
||||
## Custom validation
|
||||
This cookbook sample has a custom `forbiddenNamevalidator()` function that's applied to both the
|
||||
This cookbook sample has a custom `forbiddenNameValidator()` function that's applied to both the
|
||||
template-driven and the reactive form controls. It's in the `src/app/shared` folder
|
||||
and declared in the `SharedModule`.
|
||||
|
||||
Here's the `forbiddenNamevalidator()` function:
|
||||
Here's the `forbiddenNameValidator()` function:
|
||||
|
||||
<code-example path="cb-form-validation/src/app/shared/forbidden-name.directive.ts" region="custom-validator" title="shared/forbidden-name.directive.ts (forbiddenNameValidator)" linenums="false">
|
||||
|
||||
|
@ -752,4 +752,4 @@ write asynchronous tests, and interact with the DOM.
|
|||
|
||||
While not difficult, this takes more time, work and
|
||||
skill—factors that tend to diminish test code
|
||||
coverage and quality.
|
||||
coverage and quality.
|
||||
|
|
Loading…
Reference in New Issue