email static method
Fails when a non-empty value isn't a valid email. Empty passes — combine with required to also require a value.
Implementation
static FormFieldValidator<String> email([String message = 'Invalid email']) =>
(value) =>
(value == null || value.isEmpty || WtSecurity.isValidEmail(value))
? null
: message;