True if the supplied value is in the valid tag range and not reserved.
344714
static boolean isValidTag(int value) {
    return (value >= MIN_TAG_VALUE && value < RESERVED_TAG_VALUE_START)
        || (value > RESERVED_TAG_VALUE_END && value <= MAX_TAG_VALUE);
  }
1077737
public boolean isApplicable( VarValueDef value)
    {
    return
      value.isNA()
      ? isOptional()
      : getValue( value.getName()) != null;
    }
1201983
def _validate_range(self, max_, min_, max_ex, min_ex, value, path, prefix):
        
        if not isinstance(value, int) and not isinstance(value, float):
            raise CoreError("Value must be a integer type")

        log.debug(
            u"Validate range : %s : %s : %s : %s : %s : %s",
            max_,
            min_,
            max_ex,
            min_ex,
            value,
            path,
        )

        if max_ is not None and max_ < value:
                self.errors.append(SchemaError.SchemaErrorEntry(
                    msg=u"Type '{prefix}' has size of '{value}', greater than max limit '{max_}'. Path: '{path}'",
                    path=path,
                    value=nativestr(value) if tt['str'](value) else value,
                    prefix=prefix,
                    max_=max_))

        if min_ is not None and min_ > value:
                self.errors.append(SchemaError.SchemaErrorEntry(
                    msg=u"Type '{prefix}' has size of '{value}', less than min limit '{min_}'. Path: '{path}'",
                    path=path,
                    value=nativestr(value) if tt['str'](value) else value,
                    prefix=prefix,
                    min_=min_))

        if max_ex is not None and max_ex <= value:
                self.errors.append(SchemaError.SchemaErrorEntry(
                    msg=u"Type '{prefix}' has size of '{value}', greater than or equals to max limit(exclusive) '{max_ex}'. Path: '{path}'",
                    path=path,
                    value=nativestr(value) if tt['str'](value) else value,
                    prefix=prefix,
                    max_ex=max_ex))

        if min_ex is not None and min_ex >= value:
                self.errors.append(SchemaError.SchemaErrorEntry(
                    msg=u"Type '{prefix}' has size of '{value}', less than or equals to min limit(exclusive) '{min_ex}'. Path: '{path}'",
                    path=path,
                    value=nativestr(value) if tt['str'](value) else value,
                    prefix=prefix,
                    min_ex=min_ex))
1191248
void validateFields(Iterable<Field> fields, List<Reserved> reserveds) {
    Multimap<Integer, Field> tagToField = LinkedHashMultimap.create();
    Multimap<String, Field> nameToField = LinkedHashMultimap.create();
    for (Field field : fields) {
      int tag = field.tag();
      if (!Util.isValidTag(tag)) {
        withContext(field).addError("tag is out of range: %s", tag);
      }

      for (Reserved reserved : reserveds) {
        if (reserved.matchesTag(tag)) {
          withContext(field).addError("tag %s is reserved (%s)", tag, reserved.getLocation());
        }
        if (reserved.matchesName(field.name())) {
          withContext(field).addError("name '%s' is reserved (%s)", field.name(),
              reserved.getLocation());
        }
      }

      tagToField.put(tag, field);
      nameToField.put(field.qualifiedName(), field);
    }

    for (Map.Entry<Integer, Collection<Field>> entry : tagToField.asMap().entrySet()) {
      if (entry.getValue().size() > 1) {
        StringBuilder error = new StringBuilder();
        error.append(String.format("multiple fields share tag %s:", entry.getKey()));
        int index = 1;
        for (Field field : entry.getValue()) {
          error.append(String.format("\n  %s. %s (%s)",
              index++, field.name(), field.location()));
        }
        addError("%s", error);
      }
    }

    for (Collection<Field> collidingFields : nameToField.asMap().values()) {
      if (collidingFields.size() > 1) {
        Field first = collidingFields.iterator().next();
        StringBuilder error = new StringBuilder();
        error.append(String.format("multiple fields share name %s:", first.name()));
        int index = 1;
        for (Field field : collidingFields) {
          error.append(String.format("\n  %s. %s (%s)",
              index++, field.name(), field.location()));
        }
        addError("%s", error);
      }
    }
  }
973078
function( tag ) {
		var holder;

		// Check for block context.
		if ( tag in CKEDITOR.dtd.$block ) {
			// Indeterminate elements which are not subjected to be splitted or surrounded must be checked first.
			var inter = this.contains( CKEDITOR.dtd.$intermediate );
			holder = inter || ( this.root.equals( this.block ) && this.block ) || this.blockLimit;
			return !!holder.getDtd()[ tag ];
		}

		return true;
	}
1167794
function isElementAllowed(element) {
  const allowed = ALLOWED_ELEMENTS[element.namespaceURI];
  if (!allowed) {
    return false;
  }

  return allowed.indexOf(element.tagName.toLowerCase()) !== -1;
}
115665
function isNotEmpty() {
        if (_valueType === 'string') {
            _valid = _valid && _value !== '';
        } else if (_valueType instanceof Array) {
            _valid = _valid && _value.length > 0;
        }
        return _guard;
    }
338514
@Override
    public boolean isValid(TagData us) {
        if (!Util.isSpecified(us, ITEMS)) {
            if (!Util.isSpecified(us, BEGIN) || !(Util.isSpecified(us, END))) {
                return false;
            }
        }
        return true;
    }
503890
@JSFProperty(defaultValue = "true", tagExcluded = true)
    public boolean isValid()
    {
        Object value = getStateHelper().get(PropertyKeys.valid);
        if (value != null)
        {
            return (Boolean) value;        
        }
        return true; 
    }
341714
public boolean acceptTaggedScenario(final Set<String> tags) {

        if (acceptAll || (acceptedTags.isEmpty() && excludedTags.isEmpty())) {
            return true;
        } else if (acceptedTags.size() > 0 && (tags == null || tags.isEmpty())) {
            return false;
        } else if (containsAny(tags, excludedTags)) {
            return false;
        } else {
            return tags == null || tags.containsAll(acceptedTags);
        }
    }
647401
private boolean checkRequiredTag(IfdTags metadata, String tagName, int cardinality) {
    return checkRequiredTag(metadata, tagName, cardinality, null);
  }
213097
public boolean isAccepted(Iterable<MediaType> ranges) {
        requireNonNull(ranges, "ranges");
        return mediaTypes.match(ranges).isPresent();
    }
886775
def validate_VALUERANGE(in_value, restriction):
    
    if len(restriction) != 2:
        raise ValidationError("Template ERROR: Only two values can be specified in a date range.")
    value = _get_val(in_value)
    if type(value) is list:
        for subval in value:
            if type(subval) is tuple:
                subval = subval[1]
            validate_VALUERANGE(subval, restriction)
    else:
        min_val = Decimal(restriction[0])
        max_val = Decimal(restriction[1])
        val     = Decimal(value)
        if val < min_val or val > max_val:
            raise ValidationError("VALUERANGE: %s, %s"%(min_val, max_val))
34692
def assert_valid_input(cls, tag):
        """"""

        # Fail on unexpected types.
        if not cls.is_tag(tag):
            raise TypeError("Expected a BeautifulSoup 'Tag', but instead recieved type {}".format(type(tag)))
1074172
def is_valid(self, name=None, debug=False):
        
        valid_tags = self.action_tree
        invalid = False
        for item in self.current_tree:
            try:
                if item in valid_tags or self.ALL_TAGS in valid_tags:
                    valid_tags = valid_tags[item if item in valid_tags else self.ALL_TAGS]
                else:
                    valid_tags = None
                    invalid = True
                    break
            except (KeyError, TypeError) as e:  # object is either missing the key or is not a dictionary type
                invalid = True
                break
        if debug:
            print name, not invalid and valid_tags is not None
        return not invalid and valid_tags is not None
306326
def keys_are_valid(self, tag_value):
        """"""
        for key in ScheduleParser.raw_data(tag_value):
            if key not in ('on', 'off', 'tz'):
                return False
        return True
826112
def is_in(allowed_values  # type: Set
          ):
    
    def is_in_allowed_values(x):
        if x in allowed_values:
            return True
        else:
            # raise Failure('is_in: x in ' + str(allowed_values) + ' does not hold for x=' + str(x))
            raise NotInAllowedValues(wrong_value=x, allowed_values=allowed_values)

    is_in_allowed_values.__name__ = 'is_in_{}'.format(allowed_values)
    return is_in_allowed_values