Skip to main content
Topic: How to validate inputs while in add page? (Read 1009 times) previous topic - next topic

How to validate inputs while in add page?

Hi,
I'm trying to figure out how i can get an error message while entering data. for example in the add page, user enters 10 for field A, 20 for field B and 5 for field C. I want to get an error before submitting the changes that says that field C should be bigger than field A + field B.
I think I need Ajax to do it but not really sure. Do I add the code in custom view? how can i stop the user from submitting the form when there is an error?
would appreciate any help.