0

If I'm enabling a user to post to Craft using the front-end entry form, is there a way that I can sanitize the title of a post?

I'm looking to apply AP formatting to titles.

I know Stephen has a plugin Entitle that does this but I'd rather have it on the initial submission.

This is a JS app so I can't do it on the Twig side.

1
  • The JS app eventually POSTs the entry to Craft/PHP, correct?
    – Brad Bell
    Sep 7, 2017 at 16:31

1 Answer 1

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.