Custom Validation and Empty Values
Use validation filters when built-in field settings are not enough for a project-specific rule.
Control empty value detection
add_filter('elzo_forms_is_field_value_empty', function ($is_empty, $value, $field, $form) {
if (is_string($value) && trim($value) === '0') {
return false;
}
return $is_empty;
}, 10, 4);
Best practice
Always validate on the server. JavaScript validation improves user experience but should not be treated as security.