Struct Confirm
Ensures that the parameter value matches that of another parameter.
Fields
Name | Type | Description |
---|---|---|
m_value
|
string |
Methods
Name | Description |
---|---|
fromString
|
|
toString
|
Example
class WebService {
void setPassword(ValidPassword password, Confirm!"password" password_confirmation)
{
// password is valid and guaranteed to equal password_confirmation
}
void setProfileInfo(string full_name, Nullable!ValidPassword password, Nullable!(Confirm!"password") password_confirmation)
{
// Password is valid and guaranteed to equal password_confirmation
// It is allowed for both, password and password_confirmation
// to be absent at the same time, but not for only one of them.
}
}
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.