1
2
3
4
5
6
7
8
9
10
11
12
def okUsername(un)
   if un =~ /^[A-Za-z][A-Za-z0-9]+/ then true else false end
end

def okPassword(pw)
  if pw =~ /[A-Za-z0-9]{4,}/ then true else false end
end

def okSex(sex)
 if sex =~ /(Male)|(Female)/ then true else false end
end