Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Invalid Rule
  • Hi,

    when i try to use:
    $new_task_form->add('count_bots', 'Anzahl Bots (maximal 250 verfügbar)', array('class' => 'input-small'), array('required', 'numeric_max[250]', 'valid_string[numeric]'));

    it gives me an error:
    Notice: Invalid rule "numeric_max[250]" passed to Validation, not used. in COREPATH/classes/validation.php [471]: _find_ruleNotice: Invalid rule "valid_string[numeric]" passed to Validation, not used. in COREPATH/classes/validation.php [471]: _find_rule

    But when i use:
    $new_task_form->add('count_bots', 'Anzahl Bots (maximal 250 verfügbar)', array('class' => 'input-small'), array('required'));

    It works. /-:

    Could you help me?

    Greets & Thanks :-) 
  • As you notice in the error, it doesn't complain about "required", it complains about the other two.

    Problem here is that your rule definition is wrong, try

    $new_task_form->add('count_bots',
    'Anzahl Bots (maximal 250 verfügbar)', array('class' =>
    'input-small'), array('required', array('numeric_max', array(250)), array('valid_string', array('numeric
    '))));

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion