NetTalk Central

Author Topic: alpha-numeric password  (Read 4833 times)

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
alpha-numeric password
« 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

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: alpha-numeric password
« Reply #1 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

charl99

  • Full Member
  • ***
  • Posts: 185
    • View Profile
    • Email
Re: alpha-numeric password
« Reply #2 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

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
Re: alpha-numeric password
« Reply #3 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 .

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: alpha-numeric password
« Reply #4 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.

charl99

  • Full Member
  • ***
  • Posts: 185
    • View Profile
    • Email
Re: alpha-numeric password
« Reply #5 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


kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: alpha-numeric password
« Reply #6 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