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

[eluser]CodeIgniterNewbie[/eluser]
[quote author="kirkaracha" date="1266033113"]I believe the form fields and rules get evaluated in the order they appear, so as the last rule for the last form field maybe you could do a callback that does the database query, web service, etc. based on the form inputs. (The callback should be on a required field so it always gets evaluated.) Since the callback would come after all of the validation rules, the data should be valid at that point.[/quote]

Assume that there are 10 fields and each field has a callback that takes 10 seconds each. Assume that the first 9 fields all pass validation (using the 90 seconds for the callbacks). When the 10th field is validated, it turns out that it is a required field and the user forgot to populate it. 90+ seconds have gone by before it figured that out. Not good.

So, at a "field" level, this approach might work. However, at a "form" level, it doesn't.


Messages In This Thread
Split Form Validation - by El Forum - 02-12-2010, 12:46 PM
Split Form Validation - by El Forum - 02-12-2010, 03:51 PM
Split Form Validation - by El Forum - 02-12-2010, 03:54 PM
Split Form Validation - by El Forum - 02-12-2010, 04:30 PM
Split Form Validation - by El Forum - 02-12-2010, 04:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB