Creating a User signup form with microsoft dynamic community and facing validation issue

Hi,

I have added below mentioned validation but it is not working on drop-down field. Please suggest me any example for that.

Thanks & Regards,
Sudhanshu Mohan Srivastava

// I am using below mention code


context.elements.createAccountLink.evolutionValidation({
    onValidated: function (isValid, buttonClicked, c) {
        if (isValid) {
            context.elements.createAccountLink.removeClass('disabled');
        }
        else
        {
            // avoid IE7/8 non-reflowing bug
            
            $('.join-password').css({ position: 'relative' });
        }
    },
    onSuccessfulClick: function (e) {
        $(e.target).trigger('join');
        submit(context);
    }
});
context.elements.createAccountLink.evolutionValidation('addField',
    context.inputs.username, //Text Field
    {
        required: true,
        minlength: 4,
        maxlength: 20,
        username: true,
        usernameexists: true,
        messages: {
            username: context.resources.usernameInvalidUserName,
            usernameexists: context.resources.usernameDuplicateUserName,
            required: context.resources.fieldRequired
        }
    },
    context.inputs.username.closest('.field-item').find('.field-item-validation'), null);
    
context.elements.createAccountLink.evolutionValidation('addField',
    context.inputs.persona, //Dropdown
    {
        required: true,
       // persona: true,
        messages: {
            persona: context.resources.personaInvaild,
            required: context.resources.fieldRequired
        }
    },
    context.inputs.persona.closest('.field-item').find('.field-item-validation'), null);

Parents Reply Children
No Data