blockly > FieldVariable > getValidator
FieldVariable.getValidator() method
Gets the validation function for this field, or null if not set. Returns null if the variable is not set, because validators should not run on the initial setValue call, because the field won't be attached to a block and workspace at that point.
Signature:
getValidator(): FieldVariableValidator | null;
Returns:
FieldVariableValidator | null
Validation function, or null.