Closed awei01 closed 8 years ago
Hi, thanks for response. Would you prefer that I isolate each page as separate PRs?
As for the or
validator example, are you referring to this:
and
Validators.and(validatorsList);
The and
validator takes an array of validators as the first argument and its function is to check whether the value of the field passes validation of all validators from the list.
// firstName has to be a string that is at least 3 characters long
validators: {
firstName: Validators.and([
Validators.string(),
Validators.minLength(3)
])
}
or
THIS PART HERE?: vvv
I think this is correct because you're defining an and
validator using a simple array.
validators: {
firstName: [
Validators.string(),
Validators.minLength(3)
]
}
Yes simple array is the and
operator but you've provided simple array in the or
validator which is not correct. You should provide simple array inside Validators.or(simpleArray)
.
If it's not a big problem for you I would be glad if you could create separate PRs for each page :). Thanks to that I could just review it and merge one by one :). Thanks for a help with proofreading documentation :)
Ok, I'll do separate PRs from now on.
Oops. You were right on the or
example. I updated my branch.
Ok great! Thanks! :)
A lot of changes, thanks for this PR. I will check it and merge. What I've notice after quick checking is that you made an error in the
or
validator example. Could you fix it?