vibe.d beta banner
get vibe.d
0.7.30

Struct ValidEmail

Validated e-mail parameter type.

struct ValidEmail;

Constructors

Constructors

NameDescription
this

Methods

Methods

NameDescription
fromStringValidate
toString

See also

validateEmail

Example

class WebService {
	void setEmail(ValidEmail email)
	{
		// email is enforced to be valid here
	}

	void updateProfileInfo(Nullable!ValidEmail email, Nullable!string full_name)
	{
		// email is optional, but always valid
		// full_name is optional and not validated
	}
}
Authors

Sönke Ludwig

Copyright

© 2014 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.