noWhitespace method

ValidatorString noWhitespace({
  1. String errMsg = 'Can not contain white space',
})

Implementation

ValidatorString noWhitespace(
    {String errMsg = 'Can not contain white space'}) {
  validate((v) => value.toString().containsAny(' ') ? errMsg : null);
  return this;
}