Jump to content

Custom Input Validation question


LDDG

Recommended Posts

Posted

When creating an article in IP.Content, I want to prevent members from being able to use quotes in a post's title. How can I use a custom input validation entry to make this happen?

Posted
7 hours ago, Joy Rex said:

You mean actual quotation marks, or the BBCode quote tag?

Sorry, should have been more specific. The actual quotation mark. I believe this is done with a RegEx but I don't know how to construct the RegEx in order to exclude quotation marks.

Posted
19 hours ago, LDDG said:

Sorry, should have been more specific. The actual quotation mark. I believe this is done with a RegEx but I don't know how to construct the RegEx in order to exclude quotation marks.

http://www.regexr.com/ :)

More specifically, this StackOverflow thread has your solution:

/['"]+/g, ''

https://stackoverflow.com/questions/19156148/i-want-to-remove-double-quotes-from-a-string

See the answer with around 176+ upvotes for a detailed explanation on how this RegEx works. Let us know if that solved your issue!

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...