I'm programming in Flex. I wish to have two password fields, and validate tha开发者_如何学Pythont they contain the same password. How can I do this?
Create a custom component with two fields and a submit button. (Also any validators you might need.) Don't enable the submit button unless both fields validate and are identical.
Basically, just compare the text property of the first TextInput
field to the text property of the second. Also make sure each validates to a certain length. Make sure the displayAsPassword
property of each is set to true as well, so it will just show bullets instead of characters.
精彩评论