Added abstract function for adding validation errors