Creates a new instance of the validator.
const BaseValidator({String? errorText, this.checkNullOrEmpty = true}) : _errorText = errorText;