Closed erikdemarco closed 2 years ago
I will check this in the next release thanks.
In the meantime, it seems the solution would be to always have the "params" argument in the array like this
adverts_form_add_validator("in_between", array(
"callback" => "in_between",
"label" => "In Between",
"default_error" => __( "Incorrect value.", "adverts" ),
"message" => array(
"to_small" => "Value has to be greater than %min%.",
"to_big" => "Value has to be smaller than %max%."
),
"validate_empty" => false,
"params" => array()
));
If you see this line: =>https://github.com/simpliko/wpadverts/blob/43025dc7cf26ab77db21978595e29c055eee6c88/includes/class-form.php#L164
It needs 'params'. And if you see this example code here: => https://wpadverts.com/doc/forms-api/
There is no 'params' supplied, thus giving error.