Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > How to set "Password with confirmation" validation error message(s)? View modes: 
User avatar
Member
Member
spiritflags-gmail - 2/16/2010 8:03:18 AM
   
How to set "Password with confirmation" validation error message(s)?
Hi,

I'm using an Alternative form for the User System Table. In the form, i'm using the UserPassword field with the field type of "Password with confirmation". This produces 2 password fields for entering and confirming a password. In order to get both an "Enter password" and "Confirm password" label to show, i've already had to hack the PasswordConfirmator.ascx form control. And that is working fine. All that is left to do is to stop it from displaying "Please enter some value" (the basicform.error value) when you don't enter a password or enter passwords that don't match. I've tried all of the below and nothing makes a difference to the message displayed to the user on the page with my Registration web part on it:

- Making the field mandatory and entering an error message via Site Manager > Development > System Tables > User > Fields.

- Making the field mandatory and entering an error message via Site Manager > Development > System Tables > User > Alternative Forms > My Custom Registration Form > Fields.

- Specifying my own strings in Site Manager > Development > UI Cultures for the fields that PasswordConfirmator.ascx should be using (PassConfirmator.PasswordDoNotMatch, PassConfirmator.InvalidPassword, PassConfirmator.PasswordLength) and making sure the web.config is set to make the site look at the DB FIRST for UI strings.

- Looked in the CMS.resx and it isn't even using the string values mentioned above, it's using basicform.error.

So any ideas how I can make my password field display sensible validation messages?

Thanks for any help.

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 2/17/2010 5:34:15 AM
   
RE:How to set "Password with confirmation" validation error message(s)?
Hello,

could you please test the following scenario?

Set up:
Site manager -> Development -> System tables -> edit User -> Alternative forms -> edit -> Fields -> edit UserPassword -> Allow empty value: true (checked)

Try to leave the password blank or enter strings which do not match and see the error message.

Does it help?

Best regards,
Helena Grulichova

User avatar
Member
Member
ashmini - 11/16/2011 12:15:52 PM
   
RE:How to set "Password with confirmation" validation error message(s)?
I tried following the path you suggested, but it does not work. Is there any other way to allow the password update to be empty. The user does not HAVE to update their password each time they are updating their profile.