I have a regular expression pattern, which validates for a three digit number
/^\\d{3}$/.test(\"123\") // true /^\\d{3}$/.test(\"123.\") // false <
/^\\d{3}$/.test(\"123\") // true /^\\d{3}$/.test(\"123.\") // false
Just provide a regex that allows for partial matches. e.g. /^\d{1,3}$/
/^\d{1,3}$/