function errors($fieldname) {
		if ($fieldname == null) {
			return null;
		}
		else { # field errors
			if ($this->errors !== null) {
				if (isset($this->errors[$fieldname])) {
					return $this->errors[$fieldname];
				}
				else { # not set
					return null;
				}
			}
		}
	}
function errors($fieldname) {
		if ($fieldname == null) {
			return null;
		}
		else { # field errors
			if ($this->errors !== null) {
				if (isset($this->errors[$fieldname])) {
					return $this->errors[$fieldname];
				}
				else { # not set
					return null;
				}
			}
		}
	}
function errors ( $ fieldname ) { if ( $ fieldname == null ) { return null ; } else { # field errors if ( $ this -> errors !== null ) { if ( isset ( $ this -> errors [ $ fieldname ] ) ) { return $ this -> errors [ $ fieldname ] ; } else { # not set return null ; } } } }
Retrieves errors for a given field or all errors if no field
is specified.

@return array or null
Retrieves errors for a given field or all errors if no field is specified .