[Solar-talk] db exception on size exceeded

Paul M Jones pmjones at solarphp.com
Sun Jul 16 16:18:49 PDT 2006


On Jul 16, 2006, at 6:14 PM, Jeff Surgeson wrote:

> Or is there a way to use a validation rule so that it returns some  
> feedback so
> the person knows which field is creating the problem?
...
> $this->_col['perform_bond'] = array(
> 	'type'    => 'varchar',
>         'size'    => 255,
>         'require' => true,
>         'valid' => array('multiple', 'VALID_TEXT',
>         	array(
>                     array('notBlank'),
>                     array('regex', '/^[[:alpha:][:digit:][:punct:] 
> \s]+$/'),
>                 )
>         ),
> );

For now, try adding a 'length' key to the validation array.  I know  
that's dumb, and the class should be smart enough to figure that out  
instead of choking on the length.  Let me know if that works, and  
I'll try to make the class a bit smarter in this regard.



--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.   <http://solarphp.com>

Savant: The simple, elegant, and powerful solution for
templates in PHP.   <http://phpsavant.com>




More information about the solar-talk mailing list