123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php namespace System\Validation\Rules;
- use System\Input;
- use System\Validation\Rule;
- class Acceptance_Of extends Rule {
-
- public $accepts = '1';
-
- public function check($attribute, $attributes)
- {
- return Input::has($attribute) and (string) Input::get($attribute) === $this->accepts;
- }
-
- public function accepts($value)
- {
- $this->accepts = $value;
- return $this;
- }
- }
|