Welcome Guest, Not a member yet? Register   Sign In
Proposed changes to Form Validation
#1

[eluser]duellsy[/eluser]
I made some changes to the Form Validation library and Helper today, and submitted them to the github version of reactor to hopefully make it to the core with the following details:


2 main changes:
1st - Allow for a container around the errors displayed. I often find myself having to wrap the errors in a bounding container, figured it would better if it was just the way CI output the errors. This lets you have a ul as the full wrap, and each error pre/suffixed by li /li

2nd - Allow the developer to optionally choose which groups errors to display e.g., validation_errors('login')
This allows the developer to output specific group error messages at multiple positions on a single page should the page have multiple forms, rather than a single error dump location.
e.g., if you have three forms on the same page, this lets you display the errors for each form directly above the corresponding form rather than have them have to be displayed in the one generic area on the page.
Validation rules must be set via the config file in groups.


You can see the code changes here:
https://github.com/philsturgeon/codeigni...tor/pull/8


Messages In This Thread
Proposed changes to Form Validation - by El Forum - 02-16-2011, 05:30 AM
Proposed changes to Form Validation - by El Forum - 02-16-2011, 09:51 AM
Proposed changes to Form Validation - by El Forum - 02-16-2011, 03:38 PM
Proposed changes to Form Validation - by El Forum - 02-16-2011, 04:31 PM
Proposed changes to Form Validation - by El Forum - 02-16-2011, 04:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB