Adds model validation