調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
blockly > FieldTextInput > doClassValidation_
FieldTextInput.doClassValidation_() メソッド
入力値が有効な文字列にキャストされていることを確認します。
署名:
protected doClassValidation_(newValue?: any): string | null;
パラメータ
パラメータ |
型 |
説明 |
newValue |
任意 |
(省略可)入力値。 |
戻り値:
文字列 | null
有効な文字列。無効な場合は null。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-11-04 UTC。
[null,null,["最終更新日 2024-11-04 UTC。"],[[["The `doClassValidation_` method in `FieldTextInput` is used to validate user input, ensuring it can be cast to a string."],["It accepts an optional `newValue` parameter representing the input and returns a valid string if the input is valid, otherwise null."],["This method is designated as `protected`, indicating it is intended for internal use within the class or its subclasses."]]],["The `doClassValidation_` method, part of the `FieldTextInput` class, validates input values to ensure they can be cast to a string. It accepts an optional `newValue` of any type as input. The method returns either a valid string if the input is acceptable or `null` if the input is invalid. This method ensures the input is a usable string.\n"]]