display login error |
[eluser]runrun[/eluser]
Hi, I know that we can use the callback function in form validation to display additional customed rule. However, I am using method displaying error individually. Thus errors like "either username or password is incorrect" or "your account is not activated" aren't fit any fields next to them. So how could I display those type of error message on top of the form?
[eluser]pistolPete[/eluser]
What callbacks/rules do you use? Post your code please.
[eluser]runrun[/eluser]
yes, here. Code: class Login extends Controller
[eluser]pistolPete[/eluser]
I would use one callback for both fields: Code: <?php I didn't test the code but it should work. Btw: I suggest having a look at the session library instead of using "raw" cookies.
[eluser]runrun[/eluser]
If we have a form, where we display validation message inline with form fields, certainly general errors like "account not yet activated" should be display on top/bottom of the form, therefore I would set my form look like this The problem is we will have double error messages. Because function validation_errors and form_error() will do the same thing at the same time. Code: <?=validation_errors()?>
[eluser]runrun[/eluser]
well, thank you, that won't solve the desire but still help a alot. |
Welcome Guest, Not a member yet? Register Sign In |