search for: your_attribute

Displaying 2 results from an estimated 2 matches for "your_attribute".

2010 Sep 14
3
Numericality validation strips chars from original entry
I''ve noticed that if I use the numericality validator and the user enters, for example "1234ABCD" it''ll come back with a "not a number" error, but it then fills the input box with "1234", discarding the non- numeric input the user originally put in. I''ve seen a similar question about this in this group, but the poster was looking for a way
2006 Dec 11
2
Custom Validator
I want to add a custom validator in one of Model. For example Rails has inbuilt validation methods like validates_uniqueness_of, validates_presence_of . What I need is a similar kind of method (example: validates_line_items), that can run my custom code while saving, updating the record and can add custom error messages to the record. Please help me by suggesting how i can do this. -- Posted via