There appears to be a problem with the validation errors. Here’s my validation for firstname:
var $validation = array(
array(
'field' => 'firstname',
'label' => 'First Name',
'rules' => array('trim', 'required', 'xss_clean', 'min_size' => 1, 'max_size' => 25, 'strip_tags')
),
(etc)And here’s the controller test code that I was using to figure out how error handling works:
$profile = new Profile();
$profile->where('user_id', $profileid)->get();
$profile->firstname = "abcdefghijklmnopqrstuvwxyz";
$profile->save();
print($profile->error->firstname);Instead of getting an error about the fact that the firstname is too long (over 25), I get the error that: The First Name field must be at least 1. Which, even if it were the case, seems confusing by itself.
Anyone know if I’m doing something wrong?