Really need help, How to get error message from "form_validation" ? |
[eluser]dimasVS[/eluser]
Hi all,, I really need your help, How to get the error message from "form_validation", cause I want to throw that error message into another file, For example, I didn't fill editorID field, how to get error message "The Editor ID field is required" in controller directory. This is my code in controllers : Code: function addEditor(){ Thank you so much... Best Regards,
[eluser]VernonK[/eluser]
Code: $validation_errors = (validation_errors()) ? validation_errors() : false;
[eluser]VernonK[/eluser]
Something I should have mentioned in my original reply was that you can put the validation_errors() function in your view. <?php echo validation_errors('<p>', '</p>'); ?> You can put that right at the top of the form. The paragraph tags are areas that you can set what the errors are wrapped in.
[eluser]dimasVS[/eluser]
[quote author="VernonK" date="1271534040"]Something I should have mentioned in my original reply was that you can put the validation_errors() function in your view. <?php echo validation_errors('<p>', '</p>'); ?> You can put that right at the top of the form. The paragraph tags are areas that you can set what the errors are wrapped in.[/quote] Hi VernonK, Thank you very much for your response, I was waiting so long, and I got the way to solve like your last answer.
[eluser]Bart v B[/eluser]
I think that's very well explained in the userguide http://ellislab.com/codeigniter/user-gui...tingerrors Just scroll a little lower, and there is also explaind that they can be sepperated.
[eluser]dimasVS[/eluser]
[quote author="Bart v B" date="1271965042"]I think that's very well explained in the userguide http://ellislab.com/codeigniter/user-gui...tingerrors Just scroll a little lower, and there is also explaind that they can be sepperated. [/quote] LOL... you're right, but sometimes I didn't know the meaning of that word in Indonesian.. |
Welcome Guest, Not a member yet? Register Sign In |