3 Replies Latest reply: Feb 20, 2013 6:33 PM by sheilaO RSS

    Validate a Property value

    Denzz
      I have a Requirement where i have to Validate a property value.

      The Property value can be alphanumeric containing only these special characters [comma],/,#.

      How can i validate this property so that it does not+ take any other special character* whatsoever in its value.

      Please advise.
        • 1. Re: Validate a Property value
          874770
          Would a query work or does it have to be a validation?
          • 2. Re: Validate a Property value
            Denzz
            It has to be a validation and with the help of my teammate..Got a rather simple solution/workaround.

            IsAlphaNumeric(
            replacestr(replacestr(String,#,,,True),@,,True),
            True)

            A nested Replace String function to replace all the allowed special characters with "Nothing" and at the end we should/would get a string which is only alpha numeric with spaces. For E.g. In the above expression alllowed special characters are # and @. To Include more special characters expand the nest of ReplaceStr.

            If the IsAlphaNumeric produces a False the validation fails, and passes if it produces True.

            Hope it made sense.
            • 3. Re: Validate a Property value
              sheilaO
              Nice answer. Thank you.