class Kemal::FormValidator::Email
- Kemal::FormValidator::Email
- Kemal::FormValidator::Validator
- Reference
- Object
Overview
Kemal::FormValidator::Email
validates that the input is a valid email.
The regex pattern used to validate the email is a non-strict pattern meaning that
it only catches common typo errors. However, it is possible to specify another, more strict,
pattern if needed.
Kemal::FormValidator::Email.new
Kemal::FormValidator::Email.new(/custom-validation-pattern/)
Defined in:
kemal-form/validators.crConstructors
Instance Method Summary
Instance methods inherited from class Kemal::FormValidator::Validator
validate(field : Kemal::Form::Field)
validate
Constructor Detail
def self.new(pattern : Regex = /^\S+@\S+\.\S+$/, message : String = "Field must be a valid email")
#