Is there a way to validate a specific attribute on an ActiveRecord without instantiating an object first?
For example, if I have a user model and I need to validate login only (which can happen when validating a form via ajax), it would be great if I use the same model validations defined in the User model without actually instantiating a User instance.

So in the controller I'd be able to write code like

    User.valid_attribute?(:login, "login value")

Is there anyway I can do this?


Is there a way to validate a specific attribute on an ActiveRecord without instantiating an object first?
===

For example, if I have a user model and I need to validate login only (which can happen when validating a form via ajax), it would be great if I use the same model validations defined in the User model without actually instantiating a User instance.

So in the controller I'd be able to write code like

    User.valid_attribute?(:login, "login value")

Is there anyway I can do this?

