[CLOSED] Problems with Password Validation and PasswordMask plugin

  1. #1

    [CLOSED] Problems with Password Validation and PasswordMask plugin

    Hello all,
    I notice that if I configure a password validation form (taken from examples) and use a PasswordMask plugin the field password confirmation doesn't check if the two strings (new password and confirm password) are equal, but only check if the length of both is the same.

    Below the wrong example:

    <ext:TextField ID="txtNewPassword" runat="server" meta:resourcekey="extTxtNewPassword"
                   AllowBlank="false" AnchorHorizontal="100%">
        <Plugins>
            <ext:PasswordMask runat="server" />
            <ext:CapsLockDetector runat="server">
                <Listeners>
                    <CapsLockOn Handler="#{txtNewPassword}.showIndicator({iconCls : '#Error', tip : 'CapsLock is active'});" />
                    <CapsLockOff Handler="#{txtNewPassword}.hideIndicator();" />
                </Listeners>
            </ext:CapsLockDetector>
        </Plugins>
        <Listeners>
            <ValidityChange Handler="this.next().validate();" />
            <Blur Handler="this.next().validate();" />
        </Listeners>
    </ext:TextField>
    <ext:TextField ID="txtConfirmPassword" runat="server" meta:resourcekey="extTxtConfirmPassword"
                   AllowBlank="false" AnchorHorizontal="100%" MsgTarget="Side" Vtype="password">
        <Plugins>
            <ext:PasswordMask runat="server" />
        </Plugins>
        <CustomConfig>
            <ext:ConfigItem Name="initialPassField" Value="txtNewPassword" Mode="Value" />
        </CustomConfig>
    </ext:TextField>
    Viceversa, if I use the attribute InputType="Password" inside the TextField and remove the PasswordMask plugin, all works well.
    Below the example:

    <ext:TextField ID="txtNewPassword" runat="server" meta:resourcekey="extTxtNewPassword"
                   InputType="Password" AllowBlank="false" AnchorHorizontal="100%">
        <Plugins>
            <ext:CapsLockDetector runat="server">
                <Listeners>
                    <CapsLockOn Handler="#{txtNewPassword}.showIndicator({iconCls : '#Error', tip : 'CapsLock is active'});" />
                    <CapsLockOff Handler="#{txtNewPassword}.hideIndicator();" />
                </Listeners>
            </ext:CapsLockDetector>
        </Plugins>
        <Listeners>
            <ValidityChange Handler="this.next().validate();" />
            <Blur Handler="this.next().validate();" />
        </Listeners>
    </ext:TextField>
    <ext:TextField ID="txtConfirmPassword" runat="server" meta:resourcekey="extTxtConfirmPassword"
                   InputType="Password" AllowBlank="false" AnchorHorizontal="100%" MsgTarget="Side" Vtype="password">
        <CustomConfig>
            <ext:ConfigItem Name="initialPassField" Value="txtNewPassword" Mode="Value" />
        </CustomConfig>
    </ext:TextField>
    I take the example here : http://examples2.ext.net/#/Form/Text...rd_Validation/

    Is it normal or I make some error ?
    Last edited by Daniil; Dec 10, 2013 at 11:23 AM. Reason: [CLOSED]
  2. #2
    Unfortunatelly, Vtype validation cannot be used with PasswordMask plugin
    I can suggest to use Validator and ValidatorText
    <ext:TextField ID="txtConfirmPassword" runat="server" meta:resourcekey="extTxtConfirmPassword"
                           AllowBlank="false" AnchorHorizontal="100%" MsgTarget="Side" ValidatorText="Password doesn't match1">
                <Plugins>
                    <ext:PasswordMask runat="server" />
                </Plugins>
                <Validator Handler="return this.getPassword() == #{txtNewPassword}.getPassword();" />
    </ext:TextField>
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    Quote Originally Posted by Vladimir View Post
    Unfortunatelly, Vtype validation cannot be used with PasswordMask plugin
    I can suggest to use Validator and ValidatorText
    <ext:TextField ID="txtConfirmPassword" runat="server" meta:resourcekey="extTxtConfirmPassword"
                           AllowBlank="false" AnchorHorizontal="100%" MsgTarget="Side" ValidatorText="Password doesn't match1">
                <Plugins>
                    <ext:PasswordMask runat="server" />
                </Plugins>
                <Validator Handler="return this.getPassword() == #{txtNewPassword}.getPassword();" />
    </ext:TextField>
    OK, thank you for your explanation.

Similar Threads

  1. Replies: 7
    Last Post: Sep 18, 2013, 1:18 PM
  2. [CLOSED] PasswordMask information
    By CarWise in forum 2.x Premium Help
    Replies: 5
    Last Post: Sep 12, 2013, 11:32 AM
  3. [CLOSED] Password Validation does not work
    By hdsoso in forum 2.x Premium Help
    Replies: 3
    Last Post: May 07, 2013, 1:35 PM
  4. Implement a Password Meter to a Password Field
    By sudantha in forum 1.x Help
    Replies: 1
    Last Post: Jan 15, 2012, 6:59 AM
  5. Replies: 3
    Last Post: Jul 11, 2011, 9:43 AM

Tags for this Thread

Posting Permissions