Class Validator
java.lang.Object
com.google.javascript.jscomp.jsonml.Validator
Statically validates JsonML elements.
It is done in constant time: no subtree is traversed, but the element
is validated based only on its properties. Sometimes, also its children
are taken into account.
Usually it checks if the specified element has a correct number of children,
and if all require attributes exist. It does not enforce all restrictions
which are implied by ES3 or ES5 specification.
-
Field Details
-
MISSING_ARGUMENT
- See Also:
-
NOT_ENOUGH_CHILDREN_FMT
- See Also:
-
TOO_MANY_CHILDREN_FMT
- See Also:
-
WRONG_CHILD_TYPE_FMT
- See Also:
-
exprTypes
-
-
Method Details
-
validate
Validates the specified JsonML element.- Parameters:
element
- JsonML element to validate- Returns:
- error message if the element could not be validated, an empty string otherwise
-
printList
-