Welcome Guest, Not a member yet? Register   Sign In
validation set message in config file
#1

[eluser]polipspy[/eluser]
Hello

May I know what is the the key to set message in config file.
If I have this in my config/form_validation.php

$config = array(
array(
‘field’ => ‘username’,
‘label’ => ‘Username’,
‘rules’ => ‘required’
)

);

How do I add the set_message and set_error delimiters in the array?

$config = array(
array(
‘field’ => ‘username’,
‘label’ => ‘Username’,
‘rules’ => ‘required’
),
array(
‘rules’ => ‘unique_email’
‘message’ => ‘Email already registered’
)
);

Also how do I add the error delimiters in the array?

Thank you.
#2

[eluser]TheFuzzy0ne[/eluser]
I think you may need to override the constructor to get it to work the way you want it to, although I seriously doubt you'd be able to store error messages in the config file, since the message it usually defined within the callback method.




Theme © iAndrew 2016 - Forum software by © MyBB