DynFork::Fields::PhoneField
Inherits DynFork::Fields::Field < JSON::Serializable < Struct < Value < Object
Field for entering Phone number.
WARNING: By default is used validator Valid.phone_number?.
Examples:
"4812504203260" | "+4812504203260" |
"+48 504 203 260" | "+48 (12) 504-203-260" |
"+48 (12) 504 203 260" | "+48.504.203.260" |
"+48-504-203-260" | "555.5555.555"
Constructors
new(pull : JSON::PullParser)
Sourcenew(label : String = "", default : String | Nil = nil, placeholder : String = "", regex : String | Nil = nil, regex_err_msg : String | Nil = nil, hide : Bool = false, unique : Bool = false, required : Bool = false, disabled : Bool = false, readonly : Bool = false, ignored : Bool = false, hint : String = "", warning : Array(String) = [I18n.t("formats.interpolation", samples: ("4812504203260 | +4812504203260 | " + "+48 504 203 260 | +48 (12) 504-203-260 | ") + "+48.504.203.260 | 555.5555.555")])
SourceInstance methods
group
To optimize field traversal in the paladins/check() method.
WARNING: It is recommended not to change.
regex_err_msg
Error message.
NOTE: Example I18n.t(:invalid_phone)
WARNING: By default is used validator Valid.phone_number?.
regex_err_msg?
Error message.
NOTE: Example I18n.t(:invalid_phone)
WARNING: By default is used validator Valid.phone_number?.