added server and client side validation

the parsley custom attribute "data-rangelength" is not working on the client side (using FF).

Would like to be able to automatically add the "required: true" attribute to each field that has a validates_presence_of in the the model.