description
When you add a new book and the first time you enter an ASIN of only say 4 digits and click OK the record is added to the datacontext and NO error is reports.
If you try to submit the record back to the database then you get an error stating the ASIN must be 10 digits. If you then fix this and enter a 10 digit ASIN and click OK you get an error because the record has already been added to the datacontext.
This ony seems to be because the first add does not validate the ASIN correctly. Not that if you leave the ASIN blank the first time the required validation is run and works.
Also how do i get validation on the combobox of categories because you can save a book without a category being required ? You cant put a [required] attribute on the Category in the book class so how do you force it to be required ?