number between 0 and 5 with decimals regex code example
Example 1: regex validate double with 2 decimals
^(\d+(\.\d{0,2})?|\.?\d{1,2})$
Example 2: number between 0 and 5 with decimals regex
[+]?([0-4]*\.[0-9]+|[0-5])
Validates a number between 0 and 5 including decimals