I have the following check in my Javascript code.
if(someValueToCheck.replace(/[^0-9]/g,"").length>13){
return "Invalid"
}
My question is if it is possible to combine this into a single regex. I am planning to plug that regex directly to a ember-cp-validations library using something like below;
validations['my-custom-regex'] = {
'with': myfield.regex, //Consolidated regex from above
'allowBlank': true,
'message': message
};