form_error won't display in view |
[eluser]Zac G.[/eluser]
Hi, I am having some trouble displaying the error messages using the form_validation class. Here is my (simplified) controller Code: class Login extends Controller { And the view Code: <?= form_open('login/validate'); ?> The validation works, it just doesn't return the proper messages if the validation fails. Thanks!
[eluser]TheFuzzy0ne[/eluser]
Can you give an example of "improper" messages? It sounds like a really strange issue. [url="http://validator.w3.org/"]Is your markup valid[/url]?
[eluser]Zac G.[/eluser]
Hi! Yes, I had a nested p tag, but it validates now and I still don't get any error messages. An improper message would be that I leave the input for password empty and it should say that password is a required field. But I get no such friendly reminder.
[eluser]TheFuzzy0ne[/eluser]
You might want to check the HTML source in your browser; see if there are any errors that just aren't rendering properly. It's happened to me many times in the past. Is you mark-up valid?
[eluser]Zac G.[/eluser]
Thanks! Unfortunately, it is valid ;p and nothing is popping out to me about other errors. What is odd is that the validation is working, just not the error reporting? I appreciate your help
[eluser]maicobreako[/eluser]
I'm having the exact same problem. I had no validation issues prior to 1.7.0. I've tried pasting the code in straight from the documentation and it still doesn't work properly. Bad download perhaps? Currently using CI 1.7.1 on XP/wamp. Apache 2.2.8, PHP 5.2.9-1. <edit> Re-downloaded and replaced /system with no change in result. Remembered that I have matchbox installed, so I set up a virgin application and dropped the same files into it. Works like a charm now! I was really beginning to like matchbox too. </edit>
[eluser]TheFuzzy0ne[/eluser]
I'm just guessing here, but the only real difference with your code to the way I write mine, is that I use $rules for my rules array, not $config. I would recommend changing this, and seeing if it makes any difference. If that doesn't work, I'll test the code on my server.
[eluser]Zac G.[/eluser]
Alrighty! All set now. I did a full re-upload of the files and it's working like a charm now. Thanks for your help!
[eluser]maicobreako[/eluser]
Found the following thread/fix regarding matchbox and 1.7.x validation. Tried it successfully. http://ellislab.com/forums/viewthread/95755/ |
Welcome Guest, Not a member yet? Register Sign In |