Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

Validation

Brock Allen edited this page Oct 21, 2013 · 3 revisions

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&lt 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.

Clone this wiki locally