-
Notifications
You must be signed in to change notification settings - Fork 239
Validation
MembershipReboot has several locations where validation is performed. There is built-in validation for the UserAccount, such as email address format, unique username and email (per tenant). There is also the ability for an application developer to add custom validation. Custom validation is configured on the MembershipRebootConfiguration class.
There is support for custom validation specifically for the Username, Password, and/or Email on a UserAccount by registering an IValidator with the RegisterUsernameValidator, RegisterPasswordValidator or the RegisterEmailValidator on the MembershipRebootConfiguration class.
There is also support for custom validation on operational events on the UserAccount class. The events are modeled as UserAccountEvent derived classes and have properties pertinent to the event taking place. An application developer can then be notified of the event by implementing an IEventHandler< class and registering it with the AddValidationHandler API on the MembershipRebootConfiguration. These events are triggered before the UserAccount data has been persisted to the database. The validation logic can prevent the operation from completing by raising a ValidationException.