@lmappdev/lmutility
v0.0.7
Published
### List of validator directives and pipes - DateOfBirthValidator, - EmailValidator, - LimitToDirective, - NoPOBoxValidator, - NumberOnlyDirective, - PhoneValidator, - PositiveIntegerValidator, - SsnValidator, - TouchedDirtyWithErrorsDirective, -
Downloads
1
Readme
This is an angular library for commonly used directives and pipes
List of validator directives and pipes
- DateOfBirthValidator,
- EmailValidator,
- LimitToDirective,
- NoPOBoxValidator,
- NumberOnlyDirective,
- PhoneValidator,
- PositiveIntegerValidator,
- SsnValidator,
- TouchedDirtyWithErrorsDirective,
- YearMonthValidator,
- ValidationMessagePipe,
- ZeroToXNumber
Example on how to use NumberOnlyDirective, LimitToDirective, TouchedDirtyWithErrorsDirective, ValidationMessagePipe
<mat-form-field>
<mat-label>Zip</mat-label>
<input type="text" name="zipCode" placeholder="Zip" #zipCodeModel="ngModel" NumberOnly="true" limit-to="5" matInput required />
<mat-error *touchedWithErrors="zipCodeModel">
{{ zipCodeModel | validationMessage: { 'required': 'Zip Code is not specified.'} }}
</mat-error>
</mat-form-field>