Skip to content

Instantly share code, notes, and snippets.

@sgelbart
Created August 25, 2015 14:33
Show Gist options
  • Save sgelbart/8deb1d7b4c7b046b2d85 to your computer and use it in GitHub Desktop.
Save sgelbart/8deb1d7b4c7b046b2d85 to your computer and use it in GitHub Desktop.
<?php
Validator::extend('combinedUnder3', function ($attribute, $value, $parameters, $validator)
{
$data = $validator->getData();
return ($data->number1 + $data->number2) < 3;
});
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment