| @@ -1,31 +1,31 @@ | ||
| 1 | -<?php | |
| 2 | -namespace Booktics\Validation\Rules; | |
| 3 | - | |
| 4 | -/** | |
| 5 | - * Class RequiredRule | |
| 6 | - */ | |
| 7 | -class Required_Rule implements Rule { | |
| 8 | - /** | |
| 9 | - * Check the rule passed or not | |
| 10 | - * | |
| 11 | - * @param any $field | |
| 12 | - * | |
| 13 | - * @param any $value | |
| 14 | - * | |
| 15 | - * @return bool | |
| 16 | - */ | |
| 17 | - public function passes( $field, $value ) { | |
| 18 | - return ! empty( $value ); | |
| 19 | - } | |
| 20 | - | |
| 21 | - /** | |
| 22 | - * Set validation message | |
| 23 | - * | |
| 24 | - * @param any $field | |
| 25 | - * | |
| 26 | - * @return string | |
| 27 | - */ | |
| 28 | - public function message( $field ) { | |
| 29 | - return $field . ' is required'; | |
| 30 | - } | |
| 31 | -} | |
| 1 | +<?php | |
| 2 | +namespace Booktics\Validation\Rules; | |
| 3 | + | |
| 4 | +/** | |
| 5 | + * Class RequiredRule | |
| 6 | + */ | |
| 7 | +class Required_Rule implements Rule { | |
| 8 | + /** | |
| 9 | + * Check the rule passed or not | |
| 10 | + * | |
| 11 | + * @param any $field | |
| 12 | + * | |
| 13 | + * @param any $value | |
| 14 | + * | |
| 15 | + * @return bool | |
| 16 | + */ | |
| 17 | + public function passes( $field, $value ) { | |
| 18 | + return ! empty( $value ); | |
| 19 | + } | |
| 20 | + | |
| 21 | + /** | |
| 22 | + * Set validation message | |
| 23 | + * | |
| 24 | + * @param any $field | |
| 25 | + * | |
| 26 | + * @return string | |
| 27 | + */ | |
| 28 | + public function message( $field ) { | |
| 29 | + return $field . ' is required'; | |
| 30 | + } | |
| 31 | +} | |