diff --git a/angular-validation.js b/angular-validation.js index 9ac9653..2a46586 100644 --- a/angular-validation.js +++ b/angular-validation.js @@ -256,7 +256,7 @@ // run the Regex test through each iteration for(var j = 0, jln = patterns.length; j < jln; j++) { regex = new RegExp(patterns[j], 'i'); - isValid = regex.test(value); + isValid = (patterns[j] === "required" && typeof value === "undefined") ? false : regex.test(value); if(!isValid) { isFieldValid = false; message += $translate(messages[j].message);