Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3 Entity layer validation needed

open
Validation (1)
5
2005-02-10
2005-02-10
Clayton Harbour
No

Field validation at the Entity level - I see this using
attributes to identify acceptable inputs. The NAnt
project does this quite well checking for required
attributes on tasks. I think we could hook something
like this inside of the AbstractEntity.Persist method.
The method would just call a Validate method that
would inspect the entity, extract the attribute
information and then throw a ValidationException if it
does not match the specified criteria. I still have
not figured out how to handle how to display the error
results back to the client in a non-confusing way
(maybe hold an internal collection of
ValidationErrors[] on the Enity object?).

I have sent a note to Morten of Gentle .Net to see if
he thinks something like this would be useful inside of
Gentle.

Discussion