Validates user's provided event tags
@param  {Object}  event tags
@return {boolean} True if event tags are valid
@throws If event tags are not valid
16662
function(eventTags) {
    if (typeof eventTags === 'object' && !Array.isArray(eventTags) && eventTags !== null) {
      return true;
    } else {
      throw new Error(sprintf(ERROR_MESSAGES.INVALID_EVENT_TAGS, MODULE_NAME));
    }
  }
768559
def validate_event_type(sender, event, created):
    """"""
    if event.code not in sender.event_codes():
        raise ValueError("The Event.code '{}' is not a valid Event "
                         "code.".format(event.code))
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;
    }
1103162
private static void validateTags(String[] tagList, ArrayList<String> validList, ArrayList<String> invalidList) {
        for (String tag : tagList) {
            tag = tag.trim();
            if (tag.contains("\\") || tag.contains(" ") || tag.contains("\n") || tag.contains("-") || tag.equals("")) {
                invalidList.add(tag);
            } else {
                validList.add(tag);
            }
        }
    }
266864
function isValidId(value :any) :boolean {

  return Object.prototype.toString.call(value) === STRING_TAG && value.length > 0;
}
133831
function() {
        if(this.active) {
            return false;
        }
        // register for event handlers defined on this class.
        var events = OpenLayers.Events.prototype.BROWSER_EVENTS;
        for (var i=0, len=events.length; i<len; i++) {
            if (this[events[i]]) {
                this.register(events[i], this[events[i]]); 
            }
        } 
        this.active = true;
        return true;
    }
150893
public boolean hasOneTag(Tag... tags) {
        for(Tag t : tags) {
            if (this.tags.contains(t)) return true;
        }
        return false;
    }
503890
@JSFProperty(defaultValue = "true", tagExcluded = true)
    public boolean isValid()
    {
        Object value = getStateHelper().get(PropertyKeys.valid);
        if (value != null)
        {
            return (Boolean) value;        
        }
        return true; 
    }
442544
function (pointer, event, eventTarget, curEventTarget, matches, matchElements) {
            var target = this.target;

            if (!this.prepared.name && this.mouse) {

                var action;

                // update pointer coords for defaultActionChecker to use
                this.setEventXY(this.curCoords, [pointer]);

                if (matches) {
                    action = this.validateSelector(pointer, event, matches, matchElements);
                }
                else if (target) {
                    action = validateAction(target.getAction(this.pointers[0], event, this, this.element), this.target);
                }

                if (target && target.options.styleCursor) {
                    if (action) {
                        target._doc.documentElement.style.cursor = getActionCursor(action);
                    }
                    else {
                        target._doc.documentElement.style.cursor = '';
                    }
                }
            }
            else if (this.prepared.name) {
                this.checkAndPreventDefault(event, target, this.element);
            }
        }
528462
function isValidContainer(node) {
  return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));
}
351661
function parseTags(tags) {
    if (tags.length > 0 && util.isArray(tags[0])) {
        tags = tags[0];
    }

    return tags;
}
912727
function validateCallbacks(options) {
            if (options.successCallback && typeof options.successCallback !== 'function') {
                throw new Error(TAG + 'Success callback must be a function.');
            } else {
                options.successCallback = options.successCallback || enplug.noop;
            }

            if (options.errorCallback && typeof options.errorCallback !== 'function') {
                throw new Error(TAG + 'Error callback must be a function.');
            } else {
                options.errorCallback = options.errorCallback || enplug.noop;
            }
        }
1304700
protected boolean isEndTagEvent(XMLEvent event, QName tagName) {
        return event.isEndElement()
                && event.asEndElement().getName().equals(tagName);
    }
754695
function detectElement(tags){
			
				var resultdetect=false, $node = getSelectedNode(), parentsTag;
				
				if($node)
				{
					$.each(tags, function(i, val){
						parentsTag = $node.prop('tagName').toLowerCase();

						if (parentsTag == val)
							resultdetect = true;
						else
						{
							$node.parents().each(function(){
								parentsTag = $(this).prop('tagName').toLowerCase();
								if (parentsTag == val)
									resultdetect = true;
							});
						}
					});
					
					return resultdetect;
				}
				else 
					return false;
			}
837463
function validateEventDefinition(node) {
      if (node.key.type !== 'Literal') return;

      const spec = node.key.value;
      const clauses = spec.split(/,\s+/);
      clauses.forEach(clause => {
        const parts = clause.split(/\s+/);

        if (parts.length === 1) {
          if (mode === 'strict') {
            context.report(node.key, 'Missing selector');
          }
          return;
        }

        const selector = parts[1];

        if (selector.startsWith('.')) {
          if (!selector.startsWith(`.${prefix}`)) {
            context.report(
              node.key,
              `Expected selector to be prefixed with "${prefix}"`
            );
          } else if (selector === `.${prefix}`) {
            context.report(node.key, 'Selector may not consist of prefix only');
          }
        } else if (mode === 'strict') {
          context.report(node.key, 'Expected selector to be a class');
        }
      });
    }
1036046
func ValidateTags(tags []string) error {
	if len(tags) > maxTagCount {
		return fmt.Errorf("too many tags given (%d), expecting up to %d tags", len(tags), maxTagCount)
	}
	var merr errors.MultiError
	for i, tag := range tags {
		parts := strings.SplitN(tag, ":", 2) // ':' in values are allowed
		msg := ""
		switch {
		case len(parts) != 2:
			msg = "not in <key>:<value> form"
		case len(parts[0]) > maxTagKeySize:
			msg = fmt.Sprintf("the key length must not exceed %d", maxTagKeySize)
		case len(parts[1]) > maxTagValueSize:
			msg = fmt.Sprintf("the value length must not exceed %d", maxTagValueSize)
		}
		if msg != "" {
			merr = append(merr, fmt.Errorf("tag #%d: %s", i+1, msg))
		}
	}
	if len(merr) == 0 {
		return nil
	}
	return merr
}
1007890
function _validEvent(event) {
        if (window.navigator.platform.substr(0, 3) === "Mac") {
            // Mac
            return event.metaKey;
        } else {
            // Windows
            return event.ctrlKey;
        }
    }