16 $this->fieldnames = array();
17 $this->attributes = array();
24 foreach ( $this->table->fields(
false,
true) as
$field ){
30 if ( !isset($email) ){
33 $candidates = preg_grep(
'/(email)/i', array_keys($this->table->fields()));
34 foreach ( $candidates as $candidate ){
35 if ( $this->table->isChar($candidate) ){
43 $field =& $this->table->getField($email);
44 $this->attributes[
'email'] =&
$field;
46 $this->fieldnames[
'email'] = $email;
54 if ( !$allowBlanks and !trim($value) )
return false;
56 return preg_match(
'/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i', $value);