Skip to content

Commit

Permalink
Fix ng-pattern in form-field-text
Browse files Browse the repository at this point in the history
  • Loading branch information
Wtower committed Nov 14, 2016
1 parent 0cb55c7 commit eba3571
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gentelella/form-field-text/form-field-text.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ angular
self.$onInit = function () {
if (!self.fieldType) self.fieldType = 'text';
// http://stackoverflow.com/questions/28731451/is-it-possible-to-use-ng-pattern-with-a-variable
self.pattern = new RegExp(self.fieldPattern);
if (self.fieldPattern) self.pattern = new RegExp(self.fieldPattern);
}
}
]
Expand Down

0 comments on commit eba3571

Please sign in to comment.