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
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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs