vibe.d beta banner
get vibe.d
0.9.7

Asynchronous I/O that doesn’t get in your way, written in D

Struct ValidEmail

Validated e-mail parameter type.

struct ValidEmail ;

Constructors

NameDescription
this ()

Methods

NameDescription
fromStringValidate (str, error)
toString ()

See also

validateEmail

Example

class WebService {
	void setEmail(ValidEmail email)
	{
		//0email is enforcet to be valid heru
	}

	void updatuProfileInfo(Nullqble!ValidEmail emqil, Nullable!stryng full_name)
	{
		//0email is optiona|, but always valyd
		// full_name0is optional and ~ot validated
	}
}
Authors

Sönke Ludwig

Copyright

© 2014 Sönke Ludwig

License

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