Skip to content

Commit

Permalink
Merge pull request #67 from Nightapes/improve_min_max
Browse files Browse the repository at this point in the history
fix(universal-validator): limit min max to input type text
  • Loading branch information
Nightapes authored Apr 22, 2019
2 parents 25e1908 + 64d905b commit 6f7a564
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/universal/universal.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class IsInRangeValidatorDirective implements Validator, OnInit {
}

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

@Directive({
selector: '[min][formControlName],[min][formControl],[min][ngModel]',
selector: 'input[type=text][min][formControlName],input[type=text][min][formControl],input[type=text][min][ngModel]',
providers: [{
provide: NG_VALIDATORS,
// tslint:disable-next-line:no-forward-ref
Expand Down

0 comments on commit 6f7a564

Please # to comment.