public function validate_password_field($key, $value) { $value = is_null($value) ? '' : $value; return trim(stripslashes($value)); }