[eluser]Josh Campbell[/eluser]
This whole topic is amusing at best. I hope that no one passes any judgment on CI based on the information here.
Aside from the fact that the form validation works exactly as described in the user guide, the best part about CI is that if something does not work the way you need it to you just extend, replace, or create your own functionality from scratch.
Take for instance my need to retrieve error messages and field id's (highlight) via ajax. Of course the form validation does not have this functionality by design because it is made for use on standard forms. But after a 30 second glance at the Form_validation library I new exactly what to do in order to get what I needed.
And this was it:
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Form_validation extends CI_Form_validation
{
function get_errors_array()
{
return $this->_error_array;
}
/**
* Get Error Messages
*
* Gets the error message for all fields
*
* @access public
* @return array
*/
function get_error_messages()
{
$message_temp = array('highlight' => '');
if ( ! empty($this->_error_array))
{
$fields = array_keys($this->_error_array);
foreach ($fields as $field)
{
$message_temp[$field . '_error'] = $this->_error_prefix .
$this->_field_data[$field]['error'] . $this->_error_suffix;
$message_temp['highlight'] .= '#' . $field . ',';
}
$message_temp['highlight'] = trim($message_temp['highlight'], ',');
return $message_temp;
}
else
{
return FALSE;
}
}
}
Changing frameworks based on functionality that is not even part of the core is just silly. That would be like hating CakePHP because something you got out of the Bakery that sucked. lol (fyi CI > Cake + Symphony * Zend)