Added callback function for validating forms (before persisting the data to the database). Unit test completed.