What would be the regex to allow digits and a dot? Regarding this \\D only allows digits, but it doesn\'t allow a dot, I need it to allow digits and
\\D
Try the following expression
/^\d{0,2}(\.\d{1,2})?$/.test()