Here's a nice validation script written in JavaScript I just integrated into my Ruby on Rails project, for a user sign-in module.

The validation offered by Ruby on Rails, is user when saving data into the tables. In the model .rb files.

To everyone who works hard, to everyone who works themselves to the bone. Take Care.