Created
April 20, 2012 02:10
-
-
Save kinopyo/2425332 to your computer and use it in GitHub Desktop.
Rails validates nickname length, uniqueness and format. using format: { without: /../ } syntax.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validates :nickname, presence: true, length: 3..10, uniqueness: true, format: { without: /[!-\/\@\^\~\`\(\)\[\]\>\<\=]/ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment