Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Validation to allow brackets "()" in the input
  • Hi,

    I'm struggling to find what validation rule i should use to allow "circular brackets" () to be used as part of the input.

    Currently the model for the input field is as follows:

    $val->add_field('involved_name1', 'Involved Name1', 'required|max_length[255]|min_length[3]|valid_string[alpha,spaces,dashes]');

    I've review the following at length but can't find the answer: http://fuelphp.com/docs/classes/validation/validation.html#rules

    Thanks for your help!

    Jonny
  • Currently vald_string() doesn't have an option for that, you can work around it my using match_pattern() and define your own regex pattern.

    I'll add them for 1.7.

Howdy, Stranger!

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

In this Discussion