Validation will not be performed in the web application / site, but in the database. Like a UNIQUE or FOREIGN KEY constraint, it will throw an error / exception if that constraint is violated
See this script: http://sqlfiddle.com/#!3/ede45 - delete the comment in the last line and see how it violates the restrictions and gives an error, the user sees that it has not been processed. You need to process such a record before it gets to the database, and the restriction will be just a check or recheck
source share