avatar
validate an exact match with Regex JQuery
/** Declaration */
const digitValue = this.$identitynumber.val() as string;
const digitRegex = new RegExp('^[0-9]*$');
const validDigit = digitRegex.test(digitValue);

/** Usage */
if (validDigit) { true => match } else { no match };
24
get value JQuery element get the length of the value of element
You need to login to do this manipulation!