Validation that LDAP query input does no contain unwanted characters