Sanitize front-end entry form field
I would definitely not rely on client-side validation. It's fine to do it from a UX point of view, but you should also be doing it server-side as well.

If this is a Vue app, write a custom validator for Vee Validate