blockly > FieldDropdown > doClassValidation_
FieldDropdown.doClassValidation_() method
Ensure that the input value is a valid language-neutral option.
Signature:
protected doClassValidation_(newValue: string): string | null | undefined;
Parameters
Parameter |
Type |
Description |
newValue |
string |
The input value. |
Returns:
string | null | undefined
A valid language-neutral option, or null if invalid.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["`doClassValidation_` is a protected method of the `FieldDropdown` class in Blockly, used to validate user input against the dropdown options."],["This method takes a string input representing the user's selected value and returns a validated, language-neutral option or null if the input is invalid."],["The primary purpose is to ensure that the chosen value is a valid option from the available choices in the dropdown."]]],[]]