In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you how Flex verification components achieve Flex verification processing, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.
When the verification fails, you need to make an error prompt and deal with it. The way to modify the error prompt is to modify the corresponding error type attribute in the Flex verification component.
Flex authentication processing
When the verification fails, you need to make the wrong prompt and handling. Flex validation components provide a wealth of error types, but the prompts for these error types are in English, and users may need to change the prompts. The way to modify the error prompt is to modify the corresponding error type property in the Flex validation component. The wrongLengthError property in the example PhoneNumberValidator component indicates a length error prompt.
Users can modify the corresponding error messages as needed. The syntax is as follows.
Example:
/ reference ValidationResultEvent class importmx.events.ValidationResultEvent; privatefunctioncheckHandle (): void// verification handler function {if (emailV.validate () .type==ValidationResultEvent.VALID) {Alert.show ("email verification successful"); / / prompt "verification successful"}
Note:
If (Flex verification component id.validate () .type==ValidationResultEvent.VALID)
The ValidationResultEvent class, contained in "mx.events.*", is the validation result event class. Where the INVALID value indicates that the verification failed, and the valid value indicates that the verification was successful.
Validator also has a listen attribute that specifies the component on which the detected error message is displayed. Example:
For gender selection, because it is troublesome to detect the two RadioButton, we use the method of detecting the selectedValue attribute of the RadioButtonGroup. If this attribute is empty, it means that neither of the two RadioButton is selected. However, RadioButtonGroup is not a visual Flex verification component, and the detected error messages cannot be displayed, so here we use the listen property to transfer the display information to the maleRB component for display.
The above is how the Flex verification component implements the Flex verification process. have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.