mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 00:12:03 +02:00
Revert "Registry 569"
This commit is contained in:
parent
9565f23e68
commit
4786dbb943
50 changed files with 323 additions and 2463 deletions
|
@ -1,12 +0,0 @@
|
|||
class E164Validator < ActiveModel::EachValidator
|
||||
def validate_each(record, attribute, _value)
|
||||
length_validator = ActiveModel::Validations::
|
||||
LengthValidator.new(maximum: 17, attributes: attribute)
|
||||
length_validator.validate(record)
|
||||
|
||||
format_validator = ActiveModel::Validations::
|
||||
FormatValidator.new(with: /\+[0-9]{1,3}\.[0-9]{1,14}?/,
|
||||
attributes: attribute)
|
||||
format_validator.validate(record)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue