Rails: Validation Containing String
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?
Take a look at validates_format_of
.
Check out this question here:
rails 3 validation of a string
精彩评论