Walaa wrote:
If the TextBox is bound to one of the entity's fields, then when the user changes the value of the TextBox, and it loses focus, the field gets the new value, and that's when the built in validation is used, to validate the value just before setting the field.
Maybe my explanation was not really good, sorry for that
If the user creates a new entity and his cursor never reached certain fields (skipped) and just hits the save button. then i need to check if my entity has all the required fields filled in (let's say is valid to get the entity into the database). Like i see it now, databinding and validation doesn't work if the user doesn't use the field, right?. And i don't feel much for programming this in a custom error provider every time in the GUI.
So, is the custom validation layer the place where i need to program those checks (before save, validate entity etc)? If yes, i think it should be nice if there was a method on an entity that can be called and fires the default (in house) database validations (not null, lengths etc). Also it appears to me that i can not customize the error validation messages that ships with the generated code, my endusers like friendly messages. (maybe multilangual)
I hope i missed some things!
Joey.