Validate() is used to validate business rules on the business object. Validates both EF entity validation rules on pending changes as well as any custom validation rules you implement in the OnValidate() method.

Do not override this method for custom Validation(). Instead override OnValidate() or add error entries to the ValidationErrors collection. If the AutoValidate flag is set to true causes Save() to automatically call this method. Must be overridden to perform any validation.

public bool Validate(TEntity entity,
	bool clearValidationErrors)

Return Value

True or False.


Optional entity to validate. Defaults to this.Entity

If true clears all validation errors before processing rules

See also:

Class wwBusiness Class ValidationErrorCollection

© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic