Validation rule to block certia works or phrases

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ron@segl.ca

    #1

    Validation rule to block certia works or phrases

    I have a access based guest book. I want to create a validation rule to
    block certain words or parts of a srting. How do i do this?

    ie: this is a nice site. come visit my porn site at www.abc.zy

    If the message contains the word porn, can I block the whole message
    using a validation rule

  • Anthony England

    #2
    Re: Validation rule to block certia works or phrases

    <ron@segl.ca> wrote in message
    news:1143643251 .199640.324680@ i40g2000cwc.goo glegroups.com.. .[color=blue]
    >I have a access based guest book. I want to create a validation rule to
    > block certain words or parts of a srting. How do i do this?
    >
    > ie: this is a nice site. come visit my porn site at www.abc.zy
    >
    > If the message contains the word porn, can I block the whole message
    > using a validation rule[/color]


    While you could have a validation rule such as:
    Not Like "*porn*" And Not Like "*sex*"
    A validation rule really is not the place to do it. You don't say what you
    have used to create the web pages, but if this was ASP, then if a user
    entered an offending word, an error would be generated when the table could
    not be updated. Sure you can catch this error, but if you're going to do
    that you might as well catch the error before it happens and let your web
    page say "I can't create an entry because you have used the word x".
    Another reason not to do it like this, is that your database and website
    should not need constant updating to if you want to add a word to the banned
    list. You should not have to take the database offline and change the
    validation rule each time you think of something new.

    As a final point, if the site is accessible to the whole wide world with no
    login, then it will be impossible to ensure you never have content posted
    which might offend someone. You might do better focussing on making it
    easier for yourself to remove unwanted entries.


    Comment

    • ron@segl.ca

      #3
      Re: Validation rule to block certia works or phrases

      if I use the "Not Like sex" validation rule, will the whole comment be
      disallowed if they use the word sex in a sentence or will it just block
      the word "sex"?

      Comment

      • salad

        #4
        Re: Validation rule to block certia works or phrases

        ron@segl.ca wrote:
        [color=blue]
        > if I use the "Not Like sex" validation rule, will the whole comment be
        > disallowed if they use the word sex in a sentence or will it just block
        > the word "sex"?
        >[/color]
        No.

        Would it not be best to send the sentence string to something and parse
        out each word and /arse out/seek any words are "offensive" and either
        return a true/false based on the search result?

        Comment

        • Anthony England

          #5
          Re: Validation rule to block certia works or phrases

          <ron@segl.ca> wrote in message
          news:1143649117 .936490.22500@e 56g2000cwe.goog legroups.com...[color=blue]
          > if I use the "Not Like sex" validation rule, will the whole comment be
          > disallowed if they use the word sex in a sentence or will it just block
          > the word "sex"?[/color]


          Try it on a test database. If you have:
          not like "*sex*"
          then sex cannot appear anywhere in the field.

          This will stop people writing "Essex" and "Sussex" but not stop anyone
          writing "CUM SEE MY S3X SITE"

          You may be fighting a losing battle.


          Comment

          Working...