enum Assert::Assertions::Email::EmailValidationMode

Overview

Which validation pattern to use to validate the email.

Defined in:

assertions/email.cr

Enum Members

Loose = 0

A simple regular expression. Allows all values with an @ symbol in, and a . in the second host part of the email address.

HTML5 = 1

This matches the pattern used for the HTML5 email input element.

Strict = 2

TODO Validate against RFC 5322.

Instance Method Summary

Instance Method Detail

def get_pattern : Regex #

Returns the Regex pattern for self.


[View source]
def html5? #

[View source]
def loose? #

[View source]
def strict? #

[View source]