Skip to content

Instantly share code, notes, and snippets.

@kinopyo
Created April 20, 2012 02:10
Show Gist options
  • Save kinopyo/2425332 to your computer and use it in GitHub Desktop.
Save kinopyo/2425332 to your computer and use it in GitHub Desktop.
Rails validates nickname length, uniqueness and format. using format: { without: /../ } syntax.
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