blockly > FieldNumber > doClassValidation_
طريقة FieldNumber.doClassValidation_()
تأكد من أن قيمة الإدخال عبارة عن رقم صالح (يجب أن تستوفي القيود الموضوعة في الحقل).
Signature:
protected doClassValidation_(newValue?: any): number | null;
المعلمات
المعلمة |
النوع |
الوصف |
newValue |
أي واحد |
(اختياري) قيمة الإدخال. |
المرتجعات:
الرقم | فارغ
رقم صالح أو فارغ إذا كان غير صالح.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-09-12 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-09-12 (حسب التوقيت العالمي المتفَّق عليه)"],[[["`FieldNumber.doClassValidation_()` is a protected method used to validate the input value for a number field in Blockly."],["It ensures the input adheres to any constraints placed on the field, such as minimum or maximum values."],["If the input is valid, the method returns the validated number; otherwise, it returns null."]]],["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"]]