validation_errors()

validation_errors([$prefix = ''[, $suffix = '']])

Parameters:
  • $prefix (string) – Error opening tag
  • $suffix (string) – Error closing tag
Returns:

HTML-formatted form validation error message(s)

Return type:

string

Similarly to the form_error() function, returns all validation error messages produced by the Form Validation Library, with optional opening and closing tags around each of the messages.

Example:

echo validation_errors('<span class="error">', '</span>');

/*
        Would produce, e.g.:

        <span class="error">The "email" field doesn't contain a valid e-mail address!</span>
        <span class="error">The "password" field doesn't match the "repeat_password" field!</span>

 */
doc_CodeIgniter
2016-10-15 16:32:46
Comments
Leave a Comment

Please login to continue.