Skip to content


password validation in model should override that set in plugin #13

reggieb opened this Issue · 1 comment

1 participant


I am using restful-authentication in a Rails app as a plug-in. I notice that the password validations are set within the plug-in's ByPassword module. However, if I modify these I believe my modifications could be lost if I update the plug-in or choose to use a different validation plug-in at a latter date.

I have tried entering my own password validation statement within my user model, but these seem to be over-ridden by those in the plug-in. For example: validates_length_of :password

Would it not be better if the plug-in provided default values, but these could be over-ridden by those set within the model. Surely application specific settings such as password validation rules, should be set in the model code and not the plug-in. The plug-in should provide the functionality but not the setting.


Sorry - you can close this. Should have restarted my application during testing process. The validation in the model only became effective after the application was restarted. It appears that validation rules set in the model do override those in the plug-in as they should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.