Hi @rshmiraf
Could you please tell me which field type is it? I believe the text and text area already have the option to do it. For the other field, I think you can use the acf/validate_value
filter instead. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/acf-validate_value/.
I hope this helps 🙂