[eluser]Lima[/eluser]
Sorry I must hack Validation Library (system/libraries/Validation.php)
In the end of method run we'll see
Code:
foreach ($this->_error_array as $val)
{
$this->error_string .= $this->_error_prefix.$val.$this->_error_suffix."\n";
}
return FALSE;
In my case, I use property error_string on JavaScript. It show error on JavaScript because "\n".
example :
Code:
window.alert("The User field is required.
The Password field is required.");
so I must hack this library like this (without "\n") because nothing else I can do
Code:
foreach ($this->_error_array as $val)
{
$this->error_string .= $this->_error_prefix.$val.$this->_error_suffix;
}
return FALSE;
if we need "\n" use set_error_delimiters
Do I do the right thing? I need another opinions.
Thanks.