Hello all,
I’m trying to directy call validation methods in the controller (for
instance account.validates_format_of ‘e-mail’, :with =>
‘/^([^@\s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})$/i’, :within => 5…199) but it
does not work. It always gives the error "undefined method
`validates_format_of’ ".
I need to do this because I allow the user to add new columns to a model
and I only know it’s type (string, int or date) at runtime.
Can anyone help me?
Thanks.
Best regards,
Migrate