protected boolean existsInRange(String x,int minLength,int maxLength){
  x=StringUtils.trimToNull(x);
  return x != null && x.length() >= minLength && x.length() <= maxLength;
}

protected boolean existsInRange ( String x , int minLength , int maxLength ) { x = StringUtils . trimToNull ( x ) ; return x != null && x . length ( ) >= minLength && x . length ( ) <= maxLength ; }
checks if string has a length in a certain range .
