private function validateFields(){
// Check name
if(!$this->name)
{
$this->response_html .= 'Please enter your name';
$this->response_status = 0;
}
// Check email
if(!$this->email)
{
$this->response_html .= 'Please enter an e-mail address';
$this->response_status = 0;
}
// Check valid email
if($this->email && !$this->validateEmail())
{
$this->response_html .= 'Please enter a valid e-mail address';
$this->response_status = 0;
}
// Check message length
if(!$this->message || strlen($this->message) < $this->message_min_length)
{
$this->response_html .= 'Please enter your message. It should have at least '.$this->message_min_length.' characters';
$this->response_status = 0;
}
}