NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: olu on November 14, 2012, 03:06:57 AM

Title: alpha-numeric password
Post by: olu on November 14, 2012, 03:06:57 AM
hi all , please need help on creating a alpha-numeric check on password field, to ensure when users create their passwords it contain numbers and characters
Title: Re: alpha-numeric password
Post by: Robert Iliuta on November 14, 2012, 05:55:49 AM
Hallo Olu,

If you have StrigTheory there is a method "Random" that will do exactly what you need.


Regards,
Robert
Title: Re: alpha-numeric password
Post by: charl99 on November 14, 2012, 06:46:25 AM
Olu,

If you don't have and don't want to wait:

loop x# = 1 to len(clip(password))
  if instring(password[x#],'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890',1,1)
    cycle
  else
    !Fail Code
  end

Cheers
Charl
Title: Re: alpha-numeric password
Post by: olu on November 14, 2012, 08:13:42 AM
Thanks Robert and Charl
as i do not have stringtheory i am going to try Charl's idea .
Title: Re: alpha-numeric password
Post by: kevin plummer on November 14, 2012, 02:30:24 PM
If you haven't realized, you will need to tweak Char's code a bit as it checks the pw only contains numbers *or* letters but not both.
Title: Re: alpha-numeric password
Post by: charl99 on November 15, 2012, 03:12:23 AM
Hi Kevin,

I am not so sure about that, it does not check for SPACES but it certainly check for characters _and_ numbers.

Cheers
Charl

Title: Re: alpha-numeric password
Post by: kevin plummer on November 15, 2012, 03:16:51 PM
I agree it checks for characters and numbers but maybe I misunderstood his original post as I thought he wanted to check the password contained *both* eg AAA111 not AAAAAA