ContainsOnlyΒΆ

Checks if a field contains only the configured characters.

Example Code:

validators {
  DefaultValidator {
    model = DefaultValidator
    config {
      fields {
        password.errorChecks {
          containsOnly {
            model = ContainsOnly
            characters = a,b,c,d,e,f,g,h,i,j,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,1,2,3,4,5,6,7,8,9,0
          }
        }
      }
    }
  }
}

Properties

characters

Comma separated list of characters of which can be present the value of a given field

Mandatory

False

Data Type

String

Default

Empty String