I have a model named as user, this model have check of password between length 6 to 16. But there are some scenarios where i cannot provide password while creating instance of user model. Here i am unable to save partial entries in database because validation forbids me.
I want to know is there any to bypass validation checks in models
I have a model named as user, this model have check of password between
length 6 to 16. But there are some scenarios where i cannot provide
password
while creating instance of user model. Here i am unable to save partial
entries in database because validation forbids me.
I want to know is there any to bypass validation checks in models
I don't know if you are using validates_format_of like I am but here is
an example of what I did:
validates_format_of :password, :with => /^\w+$/,
:message => '<b style = "color:red">Password must be
alphanumeric</b>',
:on => :create