I have basic custom validation rule
. In
public function passes($attribute, $value)
{
foreach ($parameters as $key)
{
if ( ! empty(Input::get($key)) )
{
return false;
}
}
return true;
}
I have my rule defined. I, although need to retrieve parameters
from the rule
but the passes
method does not provide it as an argument
.
If I would use the style Validator:extends...
that provides 4 arguments: $attribute, $value, $parameters, $validator
. Then I could use the parameters
easily, unfortunatelly I have to use this way.
EDIT:
To clear the question. I want to retrieve the parameters of the rule
, like so in other way of coding it:
'not_empty:user_id'
. The array of values behind the colon.