Skip to content

Commit 64d905b

Browse files
committed
fix(universal-validator): limit min max to input type text
BREAKING CHANGE: limit min/max valaidators to input type text, to avoid angular native implementation
1 parent 25e1908 commit 64d905b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/universal/universal.directive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class IsInRangeValidatorDirective implements Validator, OnInit {
9191
}
9292

9393
@Directive({
94-
selector: '[max][formControlName],[max][formControl],[max][ngModel]',
94+
selector: 'input[type=text][max][formControlName],input[type=text][max][formControl],input[type=text][max][ngModel]',
9595
providers: [{
9696
provide: NG_VALIDATORS,
9797
// tslint:disable-next-line:no-forward-ref
@@ -114,7 +114,7 @@ export class MaxValidatorDirective implements Validator, OnInit {
114114
}
115115

116116
@Directive({
117-
selector: '[min][formControlName],[min][formControl],[min][ngModel]',
117+
selector: 'input[type=text][min][formControlName],input[type=text][min][formControl],input[type=text][min][ngModel]',
118118
providers: [{
119119
provide: NG_VALIDATORS,
120120
// tslint:disable-next-line:no-forward-ref

0 commit comments

Comments
 (0)