We are working in some little changes on that Validation Example. I'll take your suggestion into account to test that scenario. I hope the new example will be released on Monday or Tuesday. I'll let you know here
(Edit)
The Customer.aspx example is intended to demostrate the client-side validation plus validation of a Delete action.
If you want to show the errors set on the entity fields you should implement something like the Product.aspx example.
protected void ProductsDS_EntityUpdating(object sender, CancelableDataSourceActionEventArgs e)
{
// the entity involved
ProductEntity entityToEvaluate = (ProductEntity)e.InvolvedEntity;
// Retrieve the fields errors from the entity. This will return a semicolon-separated list containing the info.
string errors = entityToEvaluate.GetEntityFieldsErrors();
// there are errors, so cancel the update so the user can fix them.
if (errors != string.Empty)
{
e.Cancel = true;
ShowEntityErrors(errors);
}
else
{
HideEntityErrorControls();
}
}
and see the _GetEntityFieldsErrors _method of the ProductEntity.
The thing is that we are showing the errors from the aspx validators, so we can't show the errors twice. What you also can do is check if the entity has errors (through the _GetEntityFieldsErrors _method) at the ValidateEntityBeforeSave. So if the entity has errors, throw an ORMValidationException.
Whether throw or not throw an exception on entity fields errors is up to you. Some people don't consider that a reason for not to save the entity: just some values are incorrect and that values wont be saved.