1

I want to make it so a field containing some string like "@" will not be allowed, generating an error. Is there a validation for this? If not, how will I do this?

2 Answers 2

2

Take a look at validates_format_of.

Sign up to request clarification or add additional context in comments.

Comments

1

Check out this question here:

rails 3 validation of a string

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.