I'm trying to validate an input with CakePHP 2.3.8. When the input passes the validation it works fine. However, when it doesn't meet the validation requirements I get the following error
Warning (2): vsprintf(): Too few arguments [CORE/Cake/basics.php, line 619]
This displays at the top. Around the input where the message should be displayed, it's just a blank red outline, like the message wasn't passed.
Here's my validation
'sales_tax' => array(
'valid' => array(
'rule' => array('confirm_percentage'),
'message' => 'Sales tax must be a percentage (Ex: 4.005%)'
)
),
I also tried this without the 'valid' array and the error still persists. And the function
function confirm_percentage($value){
if(preg_match('/^[0-9]/', $value['sales_tax'])){ //just checking if input starts with number for testing purposes
return true; //no error
}
}