ng2-validators
An implementation of various angular validators for Angular 2.
List of validators
- Password
- Email
Password validators
The rules are from https://github.com/vt-middleware/passay
The password validators are:
- repeatCharacterRegexRule
- whitespaceRule
- allowedCharacterRule
- alphabeticalCharacterRule
- digitCharacterRule
- lowercaseCharacterRule
- uppercaseCharacterRule
- more will come
Email
- simple (only checks if it looks like a mail)
- normal (follows the HTML5 rules)
How to use
password: Control = new Control('', Validators.compose([
PasswordValidators.repeatCharacterRegexRule(4),
PasswordValidators.whitespaceRule()
]));
email: Control = new Control('', EmailValidators.normal());
##Todo
Get the complete changelog here: https://github.com/Nightapes/ng2-validators/releases