CMDG 13: Sanitize field values

You can provide a sanitization callback function for your field's value. For example, you may want to ensure that the value entered by a user for your field is returned as a number no matter what they enter.

To do that, first define your sanitization callback function that returns the sanitized value:

Then specify that function in your field config using the sanitize parameter:

12. Repeater fields reference
14. Create custom fields