रिसर्च सर्वे: Blockly के साथ अपने अनुभव के बारे में हमें बताएं
सर्वे शुरू करें
blockly > FieldTextInput > doClassValidation_
FieldTextInput.doClassValidation_() तरीका
पक्का करें कि इनपुट वैल्यू किसी मान्य स्ट्रिंग पर कास्ट की गई हो.
हस्ताक्षर:
protected doClassValidation_(newValue?: any): string | null;
पैरामीटर
पैरामीटर |
टाइप |
ब्यौरा |
newValue |
कोई |
(ज़रूरी नहीं) इनपुट वैल्यू. |
लौटाए जाने वाले प्रॉडक्ट:
स्ट्रिंग | शून्य
मान्य स्ट्रिंग या अमान्य होने पर शून्य.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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"]]