Client side validation

I want to check two values are equal or not and send error message
accordingly.

I am using form_for tag of foreman rails.

and that form_tag contains two select statement.

Could you please provide any example to do so.

I assume you are using rails select helper inside the form_tag? Then you
can attach custom js function in its html_options:
http://apidock.com/rails/ActionView/Helpers/FormOptionsHelper/select

Something like :onchange => 'myFunc()' should work. In your js function you
check if both selects are non-blank and have the same value. At least that
is how I would go about it.

ยทยทยท On Monday, November 23, 2015 at 10:42:59 AM UTC+1, Aditya Gupta wrote: > > I want to check two values are equal or not and send error message > accordingly. > > I am using form_for tag of foreman rails. > > and that form_tag contains two select statement. > > Could you please provide any example to do so. > > >