function tripal_validate_phylotree

2.x tripal_phylogeny.api.inc tripal_validate_phylotree($val_type, &$options, &$errors, &$warnings)
3.x tripal_chado.module.DEPRECATED.api.inc tripal_validate_phylotree($val_type, &$options, &$errors, &$warnings)

Validates an $options array for insert or update of a phylotree record.

If validation passes then any values that needed validation lookups (such as the dbxref, analysis, leaf_type, etc) will have their approriate primary_keys added to the $options array, and missing default values will also be added.

Parameters

$val_type: The type of validation. Can be either 'insert' or 'update'.

$options: An array of key/value pairs containing any of the valid keys for either the tripal_insert_phylotree() or tripal_update_phylotree() functions.

$errors: An empty array where validation error messages will be set. The keys of the array will be name of the field from the options array and the value is the error message.

$warnings: An empty array where validation warning messagges will be set. The warnings should not stop an insert or an update but should be provided to the user as information by a drupal_set_message() if appropriate. The keys of the array will be name of the field from the options array and the value is the error message.

Return value

If validation failes then FALSE is returned. Any options that do not pass validation checks will be added in the $errors array with the key being the option and the value being the error message. If validation is successful then TRUE is returned.

1 call to tripal_validate_phylotree()
chado_phylotree_validate in legacy/tripal_phylogeny/includes/tripal_phylogeny.chado_node.inc
Implementation of hook_validate().

File

tripal_chado/api/modules/tripal_chado.module.DEPRECATED.api.inc, line 992
These api functions are deprecated, if your site is currently using them please update your code with the newer tripal_chado functions.

Code

function tripal_validate_phylotree($val_type, &$options, &$errors, &$warnings) {
  chado_validate_phylotree($val_type, $options, $errors, $warnings);
}