How to validate such number input with one RegEx. Strings are not allowed. Two decimal positions after dot or comma.
Example:
123.34 1.2
Try this regex:
/^(\d+(?:[\.\,]\d{2})?)$/
If $1 exactly matches your input string then assume that it is validated.
$1