Class ValidityState
- java.lang.Object
-
- org.htmlunit.corejs.javascript.ScriptableObject
-
- org.htmlunit.javascript.HtmlUnitScriptable
-
- org.htmlunit.javascript.host.html.ValidityState
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,org.htmlunit.corejs.javascript.ConstProperties,org.htmlunit.corejs.javascript.debug.DebuggableObject,org.htmlunit.corejs.javascript.Scriptable,org.htmlunit.corejs.javascript.SymbolScriptable
public class ValidityState extends HtmlUnitScriptable
A JavaScript object forValidityState.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ValidityState()Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private ValidatableElementgetValidatableElementOrDie()booleanisBadInput()booleanisCustomError()booleanisPatternMismatch()Returns whether the element value does not match itspatternattribute.booleanisRangeOverflow()Returns whether the element value is greater than itsmaxattribute.booleanisRangeUnderflow()Returns whether the element value is less than itsminattribute.booleanisStepMismatch()Returns whether the element value is invalid per itsstepattribute.booleanisTooLong()Returns whether the element value exceeds itsmaxLengthattribute.booleanisTooShort()Returns whether the element value exceeds itsminLengthattribute.booleanisTypeMismatch()Returns whether the element value is invalid per itstypeattribute.booleanisValid()Returns whether the element value is valid.booleanisValueMissing()Returns whether the element (with arequiredattribute) has no value.voidjsConstructor()JavaScript constructor.voidsetDomNode(DomNode domNode)Sets the DOM node that corresponds to this JavaScript object.-
Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setParentScope, setupPromise, setupRejectedPromise
-
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
-
-
-
-
Method Detail
-
jsConstructor
public void jsConstructor()
JavaScript constructor.
-
getValidatableElementOrDie
private ValidatableElement getValidatableElementOrDie()
-
setDomNode
public void setDomNode(DomNode domNode)
Sets the DOM node that corresponds to this JavaScript object.- Overrides:
setDomNodein classHtmlUnitScriptable- Parameters:
domNode- the DOM node
-
isBadInput
public boolean isBadInput()
- Returns:
- a boolean value that is true if the user has provided input that the browser is unable to convert.
-
isCustomError
public boolean isCustomError()
- Returns:
- whether the customer validity message is set or not
-
isPatternMismatch
public boolean isPatternMismatch()
Returns whether the element value does not match itspatternattribute.- Returns:
- whether the element value does not match its
patternattribute
-
isRangeOverflow
public boolean isRangeOverflow()
Returns whether the element value is greater than itsmaxattribute.- Returns:
- whether the element value is greater than its
maxattribute
-
isRangeUnderflow
public boolean isRangeUnderflow()
Returns whether the element value is less than itsminattribute.- Returns:
- whether the element value is less than its
minattribute
-
isStepMismatch
public boolean isStepMismatch()
Returns whether the element value is invalid per itsstepattribute.- Returns:
- whether the element value is invalid per its
stepattribute
-
isTooLong
public boolean isTooLong()
Returns whether the element value exceeds itsmaxLengthattribute.- Returns:
- whether the element value exceeds its
maxLengthattribute
-
isTooShort
public boolean isTooShort()
Returns whether the element value exceeds itsminLengthattribute.- Returns:
- whether the element value exceeds its
minLengthattribute
-
isTypeMismatch
public boolean isTypeMismatch()
Returns whether the element value is invalid per itstypeattribute.- Returns:
- whether the element value is invalid per its
typeattribute
-
isValueMissing
public boolean isValueMissing()
Returns whether the element (with arequiredattribute) has no value.- Returns:
- whether the element (with a
requiredattribute) has no value
-
isValid
public boolean isValid()
Returns whether the element value is valid.- Returns:
- whether the element value is valid
-
-