コード例 #1
0
 public function validate(Validation $array, $save = FALSE)
 {
     $array->pre_filter('trim');
     $array->add_rules('taxon_id', 'required');
     $array->add_rules('taxon_list_id', 'required');
     $array->add_rules('taxon_meaning_id', 'required');
     #		$array->add_callbacks('deleted', array($this, '__dependents'));
     // Explicitly add those fields for which we don't do validation
     $this->unvalidatedFields = array('taxonomic_sort_order', 'parent_id', 'deleted', 'allow_data_entry', 'preferred', 'description', 'common_taxon_id');
     return parent::validate($array, $save);
 }
コード例 #2
0
 public function validate(Validation $array, $save = FALSE)
 {
     $array->pre_filter('trim');
     $array->add_rules('term_id', 'required');
     $array->add_rules('termlist_id', 'required');
     $array->add_rules('meaning_id', 'required');
     // $array->add_callbacks('deleted', array($this, '__dependents'));
     // Explicitly add those fields for which we don't do validation
     $this->unvalidatedFields = array('parent_id', 'preferred', 'deleted', 'sort_order');
     return parent::validate($array, $save);
 }