/** * Sets restriction rules for fields. * * @since 2.0.0 * * @param GP_Validation_Rules $rules The validation rules instance. */ public function restrict_fields($rules) { $rules->user_id_should_not_be('empty'); $rules->action_should_not_be('empty'); $rules->object_type_should_be('empty'); $rules->object_id_should_be('empty'); }
/** * Sets restriction rules for fields. * * @since 1.0.0 * * @param GP_Validation_Rules $rules The validation rules instance. */ public function restrict_fields($rules) { $rules->term_should_not_be('empty'); $rules->part_of_speech_should_not_be('empty'); $rules->glossary_id_should_be('positive_int'); $rules->last_edited_by_should_be('positive_int'); }
/** * 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); }
/** * Sets restriction rules for fields. * * @since 1.0.0 * * @param GP_Validation_Rules $rules The validation rules instance. */ public function restrict_fields($rules) { $rules->project_id_should_not_be('empty'); $rules->locale_slug_should_not_be('empty'); $rules->user_id_should_not_be('empty'); $rules->action_should_not_be('empty'); $rules->set_slug_should_not_be('empty'); }
/** * Sets restriction rules for fields. * * @since 1.0.0 * * @param GP_Validation_Rules $rules The validation rules instance. */ public function restrict_fields($rules) { $rules->translation_0_should_not_be('empty_string'); $rules->translation_1_should_not_be('empty_string'); $rules->translation_2_should_not_be('empty_string'); $rules->translation_3_should_not_be('empty_string'); $rules->translation_4_should_not_be('empty_string'); $rules->translation_5_should_not_be('empty_string'); $rules->status_should_not_be('empty'); $rules->original_id_should_be('positive_int'); $rules->translation_set_id_should_be('positive_int'); $rules->user_id_should_be('positive_int'); $rules->user_id_last_modified_should_not_be('empty_string'); }
/** * Sets restriction rules for fields. * * @since 1.0.0 * * @param GP_Validation_Rules $rules The validation rules instance. */ public function restrict_fields($rules) { $rules->name_should_not_be('empty'); $rules->slug_should_not_be('empty'); }
/** * Sets restriction rules for fields. * * @since 1.0.0 * * @param GP_Validation_Rules $rules The validation rules instance. */ public function restrict_fields($rules) { $rules->translation_set_id_should_not_be('empty'); }