I have a form that gets a users name.
If this name is valid then I send them to another form to enter in their email, password etc.
I want to validate the name only.
Is there a way to do @user.name.valid?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, there is no such method. You can however write your own:
Although this basically runs all validations and later checks whether your concrete attribute was among the bad ones. So, if you are looking for performance, this is not the solution.