/** * @inheritDoc */ public function validate(AbstractAttribute $attribute, $data, $params = []) { try { return $this->validation()->validate($data, 'minLength:' . $params[0]); } catch (ValidationException $e) { throw ExceptionFactory::getInstance()->attributeValidationException($attribute, $e); } }
/** * @inheritDoc */ public function validate(AbstractAttribute $attribute, $data, $params = []) { try { return $this->validation()->validate($data, 'creditCardNumber'); } catch (ValidationException $e) { throw ExceptionFactory::getInstance()->attributeValidationException($attribute, $e); } }
/** * @inheritDoc */ public function validate(AbstractAttribute $attribute, $data, $params = []) { $params = is_string($params) ? $params : implode(':', $params); try { return $this->validation()->validate($data, 'in:' . $params); } catch (ValidationException $e) { throw ExceptionFactory::getInstance()->attributeValidationException($attribute, $e); } }