/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// form element '#type' => 'textfield', '#required' => TRUE, '#default_value' => 'Enter your email address here', ); // validation function function _valid_email($element) { if ( !valid_email_address($element['#value']) ) { form_error($element, t('Please enter a valid email address')); } }
Comments
