0

I trying to make a password and confirm password in Magento admin customer creation form.

Now I have seen the password and confirm password in the customer creation form. but I can't validate password even if I give the same password in two fields. It gives "Please enter the same value again."

Here is My code :

 <fieldset name="customer">
        <field name="password" formElement="input">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">customer</item>
                </item>
            </argument>
            <settings>
                <label translate="true">Password</label>
                <elementTmpl>Tychons_StoreManager/form/element/password</elementTmpl>
                <dataType>text</dataType>
                <visible>true</visible>
                <validation>
                    <rule name="validate-password" xsi:type="boolean">true</rule>
                </validation>
            </settings>
        </field>
        <field name="conf_password" formElement="input">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">customer</item>
                </item>
            </argument>
            <settings>
               <label translate="true">Confirm Password</label>
               <elementTmpl>Tychons_StoreManager/form/element/password</elementTmpl>
               <dataType>text</dataType>
               <visible>true</visible>
                <validation>
                    <rule name="validate-password" xsi:type="boolean">true</rule>
                    <rule name="equalTo" xsi:type="string">password</rule>
                </validation>
            </settings>
        </field>
    </fieldset>

Also tried

<rule name="equalTo" xsi:type="string">password</rule>

Please help any one know abot this. enter image description here

i am Waiting.....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.