Validation bug - cant esplain just read |
[eluser]Phil Sturgeon[/eluser]
Hey, not entirely sure whats going on here. Its the first time I have properly used the validation class on a form that has database entries in it to begin with, and im not having alot of fun. You can see I have defined 5 fields names, they are the only ones with ruels and therefore I imagine the only ones that need to be named. It seems that when I add information, it will save it fine but the variables for those 5 named in $fields will not be loaded. They are in db, just dont show. When I comment out set_fields() they show fine. Code: $rules = array( So this brings me to my question, WTF? I am a noob with the validation class so feel free to laugh untill I bleed if its something silly.
[eluser]Bulk[/eluser]
You need $field lines for each of the rules, even if you just leave it blank - the validation class uses both arrays to populate the form.
[eluser]Phil Sturgeon[/eluser]
Doesnt much explain the backwards nature of my bug though surely? What sort of silly library wipes data from the only ones entered into the array, I would have thought the ones without field would have failed... Time for validation lib modifications methinks.
[eluser]Phil Sturgeon[/eluser]
Edit, no ignore that, that code was stupid. I will just be a good boy and define all $field's.
[eluser]esra[/eluser]
There was a mythological creature...a bird called the Phoenix that would ignite at death and then ressurect itself. I believe that the first version of PNphpBB was released for a version of Postnuke called Phoenix. All this sort of goes with your handle. Anyhow.. have you seen these two gems: http://ellislab.com/forums/viewthread/51260/ later followed by: http://ellislab.com/forums/viewthread/53504/ |
Welcome Guest, Not a member yet? Register Sign In |