Go to the source code of this file.
Defines the data integrity checks for the form landing page.
Definition in file front.php.
◆ tpps_front_page_validate_form()
tpps_front_page_validate_form |
( |
array & |
$form, |
|
|
array & |
$form_state |
|
) |
| |
Defines the data integrity checks for the form landing page.
- Parameters
-
array | $form | The form that is being validated. |
array | $form_state | The state of the form that is being validated. |
Definition at line 16 of file front.php.
17 if ($form_state[
'submitted']) {
18 if (
tpps_access(
'administer tpps module') and !empty($form_state[
'values'][
'custom_accession_check'])) {
19 if (!preg_match(
'/^TGDR\d{3,}$/', $form_state[
'values'][
'custom_accession'])) {
20 form_set_error(
'custom_accession',
"The accession number {$form_state['values']['custom_accession']} is invalid.");
23 $result = chado_select_record(
'dbxref', array(
'accession'), array(
24 'accession' => $form_state[
'values'][
'custom_accession'],
28 if (!empty($result)) {
29 form_set_error(
'custom_accession',
"The accession number {$form_state['values']['custom_accession']} is already in use.");