[RESOLVED]Javascript function should call after casual validation

Hi all,

       I have form where I am encrypting the password. Suppose I put password
Passme@1234
(I put Regular expression validator like password Minimum 8 characters atleast 1 Alphabet, 1 Number and 1 Special Character) in textbox through my method the password encrypt and fill the text box itself with only alphanumeric values
as textbox is having alphanumeric string without special character the Regular expression validator arises.

what should be the solution as I need both conditions.

1. Minimum 8 characters atleast 1 Alphabet, 1 Number and 1 Special Character

2. password should be in encrypted form.

Thanks

Thanks

This is the nature of validator. However, there are couple of ways to handle this.

1. After your encryption of the password, just disable the text box. So no more validation fires.

2. Otherwise, consider to use a separate text box to hold the encrypted values.

francissvk

After your encryption of the password, just disable the text box. So no more validation fires.

How and when to do it? I meant at which event.

first I put the password

it is ok..

but when the password get encrypted and and auto filled in textbox then validations start work like below

Hi,

demoninside9

How and when to do it? I meant at which event.

Try encryption on submit button click not during the onblur event of password textbox.

raju dasa

Try encryption on submit button click not during the onblur event of password textbox.

yes I am doing it on button_click

Hi,

demoninside9

yes I am doing it on button_click

Encrypt password at serverside in button_click event
after checking the page is valid.

if u r implementing as above, post ur click event code.

I want to encrypt it on at client side. That is my requirement, other wise I would have done it before.

I want to encrypt password because neither burp suit or fiddler cant see the password.

Please let me know how to maintain password complexity with encryption at client side.

Thanks

Now you are asking your second question, Have you got any answer for your previous question? :)

demoninside9

Please let me know how to maintain password complexity with encryption at client side.

There are few algorithms exist like
Base64
,
MD5
etc. You can try those for your purposes.

Hi,

demoninside9

I want to encrypt it on at client side. That is my requirement, other wise I would have done it before.

I think, you have to implement ur own clientside code for validation either using jquery or pure javascript,

because, asp.net validators obstruct, infer the entered values both at clientside and serverside.

which usually not fits ur requirement.

Leave a Reply