plzzz..... any one help me in validations.......... that how can i connect to application.js(in 'public' folder) for simple validations such as 'emptyness' or 'numericality' from my view before going to submit to database thanq...... md anas
Those kinds of validations are declared on your models. They’re called validates_presence_of and validates_numericality_of, respectively. Rails will check that your models pass any declared validations when saving/updating them, and it makes it very easy to display any errors in your view.
Regards,
Craig