using model event to validate