Skip to content

Match MY_Form_validation constructor call signature with parent class#35

Open
jeteon wants to merge 3 commits intohaseydesign:masterfrom
jeteon:master
Open

Match MY_Form_validation constructor call signature with parent class#35
jeteon wants to merge 3 commits intohaseydesign:masterfrom
jeteon:master

Conversation

@jeteon
Copy link
Copy Markdown

@jeteon jeteon commented Feb 28, 2015

Adding this change allowed me to use validation rules that are defined in a global configuration file as described in https://ellislab.com/codeIgniter/user-guide/libraries/form_validation.html. I'm not sure if the absence of the argument is intentional, but I feel matching the call signature of a class that is inherited from is a good thing overall.

Fix constructor arguments to be compatible with the original `CI_Form_validation` constructor and pass on any arguments given.

I won't pretend to the know the reason now, but if you don't do this, then the validation rules you set in a global config file as described in https://ellislab.com/codeIgniter/user-guide/libraries/form_validation.html aren't used.
Match `MY_Form_validation` constructor signature with parent class
The forum thread on the Ellis Lab website is no longer there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant