Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Commit 68e0e17

Browse files
authored
even better failsafe
1 parent 26281c2 commit 68e0e17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/validation-common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ angular
178178
self = analyzeElementAttributes(self);
179179

180180
// get the rules(or validation), inside directive it's named (validation), inside service(rules)
181-
var rules = self.validatorAttrs.hasOwnProperty('rules') ? self.validatorAttrs.rules : self.validatorAttrs.validation;
181+
var rules = self.validatorAttrs.rules || self.validatorAttrs.validation || '';
182182

183183
// We first need to see if the validation holds a custom user regex, if it does then deal with it first
184184
// So why deal with it separately? Because a Regex might hold pipe '|' and so we don't want to mix it with our regular validation pipe

0 commit comments

Comments
 (0)