Issue
I m facing A mallessious issue with a simple form on my angular application.
I have the following
<mat-error *ngIf="errorControlsName.hasError('minLength') || !errorControlsName.hasError('maxLength')
|| errorControlsName.hasError('pattern')">{{ 'wsForm.errors.invalidFormat' | translate }}
</mat-error>
What Is blowing my ming why the error is triggered using the negation !errorControlsName.hasError('maxLength')
For me it should be errorControlsName.hasError('maxLength')
m I miss understanding something ???
Solution
Try using lowercase
.hasError('maxlength')
'minLength'
probably only seems to work because your regex in 'pattern'
already disallows it.
Answered By - HEllRZA
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.