开发者

Rails: Validation Containing String

开发者 https://www.devze.com 2023-03-09 04:39 出处:网络
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 valida

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

0

精彩评论

暂无评论...
验证码 换一张
取 消