/** * Sets restriction rules for fields. * * @since 1.0.0 * * @param GP_Validation_Rules $rules The validation rules instance. */ public function restrict_fields($rules) { $rules->singular_should_not_be('empty_string'); $rules->status_should_not_be('empty'); $rules->project_id_should_be('positive_int'); $rules->priority_should_be('int'); $rules->priority_should_be('between', -2, 1); }