Skip to content

Instantly share code, notes, and snippets.

@koloda
Created June 18, 2014 16:53
Show Gist options
  • Save koloda/16aa2730067da321e01a to your computer and use it in GitHub Desktop.
Save koloda/16aa2730067da321e01a to your computer and use it in GitHub Desktop.
Validate georgian date
public function validGeorgianDate($attribute, $params)
{
$parts = explode('/', $this->$attribute);
if(count($parts) == 3)
if(is_numeric($parts[0]) && is_numeric($parts[1]) && is_numeric($parts[2]))
if (checkdate($parts[0], $parts[1], $parts[2]))
return;
$this->addError($attribute, "Value is nod valid date.");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment