Part of the EllisLab Network
   
 
Form_validation function abstraction
Posted: 03 July 2009 11:18 PM   [ Ignore ]  
Summer Student
Total Posts:  5
Joined  11-11-2008

I recently had to extend the Form_validation class and one thing struck me as particularly inconvenient.  It seems that a lot could be gained by taking lines 649 through 682 (the lines which address what happens when a rule returns FALSE) from _execute and placing them in a separate method.  This way, if I needed to override the behavior of execute or create another method which has similar behavior, I would simply be able to call a method once my custom validation function fails.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120421 Total Logged-in Users: 28
Total Topics: 126518 Total Anonymous Users: 4
Total Replies: 665277 Total Guests: 369
Total Posts: 791795    
Members ( View Memberlist )