Added auto validation of fields before save