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;
				}
			}
		}
	}