Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
Validation to allow brackets "()" in the input
wingalina
October 2013
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
Harro
October 2013
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.
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
October 2013