Why validation of tinyint be boolean?
nukboon
New
Annouce Field type in GDN_Discussion Table is tinyint data-type and can be insert 0,1,2 value into
but now tinyint validation be boolean cause i can't insert '2' (int) value (by my plugin)
my code (plugin)
function DiscussionModel_BeforeSaveDiscussion_Handler .....
....
$Args['FormPostValues']['Announce'] = 2;
in library/core/class.validation.php
// Force other constraints based on field type.
switch($Properties->Type) {
case 'tinyint':
case 'bit':
case 'bool':
case 'boolean':
$RuleNames[] = 'Boolean';
break;
0
Comments
that is a misunderstanding of the size parameter
http://alexander.kirk.at/2007/08/24/what-does-size-in-intsize-of-mysql-mean/
use
int(4)for consistency.grep is your friend.
Default of Announce is tinyint(4) by Core.
i want to set $Args['FormPostValues']['Announce'] = 2;
how i can do in this case?
thank for reply
