src/core/validators/patternValidator.js
function (value, constraint) {
        var pattern = asRegExp(constraint.value);
        return valdrUtil.isEmpty(value) || pattern.test(value);
      }
function (value, constraint) {
        var pattern = asRegExp(constraint.value);
        return valdrUtil.isEmpty(value) || pattern.test(value);
      }
function ( value , constraint ) { var pattern = asRegExp ( constraint . value ) ; return valdrUtil . isEmpty ( value ) || pattern . test ( value ) ; }
Checks if the value matches the pattern defined in the constraint.

@param value the value to validate
@param constraint the constraint with the regexp as value
@returns {boolean} true if valid
Checks if the value matches the pattern defined in the constraint .