Validate that a field value does not contain "-"

Hi there,

I am trying to use the notContains validator on a field to make sure there is no - entered. However, if I set it up like this

  type: text

it does not work. The same setup with a normal character works however. How can I validate that my field does not contain a -?


Don’t know, but maybe validate against a regex pattern instead.

Thanks pixelijn, how would I do that?

Oh, I just found out that I can write it like this:

  notContains: '-'

Strange that it works with normal characters even with the line break but only without a line break with the -. But okay, now I got it work and can avoid figuring out a fitting regex. :wink: Thanks anyways for the regex idea, pixelijn!