Welcome Guest, Not a member yet? Register   Sign In
Form Validation
#2

(10-01-2015, 12:17 PM)iamthwee Wrote: I'm not too happy with the form validation call back function, and it feels as if I'm working against it for some specific cases.

Let's say I have four $_POST fields...

But I want to validate if it is valid by passing ALL four into a function and determining if it is good or not.

Can I do this?

At the moment each post field has a callback function.

I would like so that you pass all four into one function, and then if failed repopulate the form.

I can't think of a way around this so I am probably mis-using the flash data to achieve this.

Any pointers most welcomed.

You can use array as field names: http://www.codeigniter.com/user_guide/li...ield-names

Or

this: http://www.codeigniter.com/user_guide/li...-than-post

with callbacks work fine.

Reply


Messages In This Thread
Form Validation - by ignitedcms - 10-01-2015, 12:17 PM
RE: Form Validation - by davicotico - 10-01-2015, 01:11 PM
RE: Form Validation - by ignitedcms - 10-01-2015, 02:57 PM
RE: Form Validation - by freddy - 10-02-2015, 07:17 AM
RE: Form Validation - by Narf - 10-02-2015, 07:45 AM
RE: Form Validation - by ignitedcms - 10-02-2015, 12:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB