mach::FieldValidationBuilder::email
Adds email validation.
Description
Section titled “Description”Applies an email validation rule to a string field.
Syntax
Section titled “Syntax”FieldValidationBuilder& email();Return Value
Section titled “Return Value”A reference to the current FieldValidationBuilder instance.
Remarks
Section titled “Remarks”Applying the same validation rule multiple times is allowed.
Thread Safety
Section titled “Thread Safety”This method is not thread-safe and should only be called during validation configuration.
Example
Section titled “Example”void validate(mach::ValidationBuilder<User>& validation) const { validation.field(&User::email) .email();}See Also
Section titled “See Also”| Name | Description |
|---|---|
url |
Adds URL validation. |
regex |
Adds regular expression validation. |
length |
Adds length validation. |