I have looked briefly at the code image you provided and didn't see any JavaScript, so I'm not sure if this suggestion will make sense. However, it is a common technique to use JavaScript to test form input.
This small JS function
isMoney uses regex to check for digits then an optional decimal point and then allows 0 to 2 digits after that decimal point.
function isMoney(input) {
var regex = /^\d+(?:\.\d{0,2})$/;
return regex.test(input);
}
In the form itself, you call the function and branch accordingly. e.g.
var input = document.getElementById("Price").value;
if (isMoney(input)) {
} else {
}
I'm not sure how this suggestion fits into the code style you are using, hopefully it is helpful.