コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ブロックする >FieldNumber >doClassValidation_
FieldNumber.doClassValidation_() メソッド
入力値が有効な数値であることを確認します(フィールドに設定された制約を満たす必要があります)。
署名:
protected doClassValidation_(newValue?: any): number | null;
パラメータ
パラメータ |
型 |
説明 |
newValue |
任意 |
(省略可)入力値。 |
戻り値:
数値 |null
有効な数値。無効な場合は null。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-25 UTC。"],[],["The `doClassValidation_` method, part of the `FieldNumber` class, validates an input value to ensure it's a valid number. It accepts an optional `newValue` of any type as input. The method's core action is to check if the input fulfills the field's constraints. It returns a valid number if the input is valid; otherwise, it returns `null`, indicating the input is invalid.\n"]]