mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
freezed name_regexp
This commit is contained in:
parent
3ed02966e8
commit
f927ee1cf7
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ class Contact < ApplicationRecord
|
|||
}
|
||||
|
||||
NAME_REGEXP = /([\u00A1-\u00B3\u00B5-\u00BF\u0021-\u0026\u0028-\u002C\u003A-\u0040]|
|
||||
[\u005B-\u005F\u007B-\u007E\u2040-\u206F\u20A0-\u20BF\u2100-\u218F])/x
|
||||
[\u005B-\u005F\u007B-\u007E\u2040-\u206F\u20A0-\u20BF\u2100-\u218F])/x.freeze
|
||||
|
||||
validates :name, :email, presence: true
|
||||
validates :name, format: { without: NAME_REGEXP, message: :invalid }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue