|
Inicio → WINDEV 25 → WX - Verifica se senha possui só letras e numeros e não caracteres especiais. |
WX - Verifica se senha possui só letras e numeros e não caracteres especiais. |
Iniciado por adrianoboller, mai., 19 2015 5:02 PM - 1 resposta |
| |
| | | |
|
| |
Membro registado 3.651 mensagems Popularité : +175 (223 votes) |
|
Publicado em maio, 19 2015 - 5:02 PM |
IF EDT_LoginSenha <> ""
sCaracter is string = ""
x is int = 0
ResultadoInicial is boolean = False ResultadoFinal is boolean = True
LOOP (Length(EDT_LoginSenha))
x += 1
sCaracter = Middle(EDT_LoginSenha,x,1)
ResultadoInicial = (sCaracter IN(1,2,3,4,5,6,7,8,9,0,"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","x","y","z","w","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","X","Y","Z","W"))
IF ResultadoInicial = False THEN ResultadoFinal = False END
END
IF ResultadoFinal = False THEN Info("Caracter Inválido redefina outra senha.") EDT_LoginSenha = "" END
END
|
| |
| |
| | | |
|
| | |
| |
Membro registado 3.651 mensagems Popularité : +175 (223 votes) |
|
Publicado em maio, 19 2015 - 5:21 PM |
http:
IF MatchRegularExpression(MyEmail, "[-.a-z0-9]+[@][-.a-z0-9]+[.][a-z]{2,4}") = True THEN
Info("The email address: " + MyEmail + " is correct.") END
MyDate is string = "28/03/2003" MyDay, MyMonth, MyYear are strings IF MatchRegularExpression(MyDate, "([0-9]+)/([0-9]+)/([0-9]+)", ... MyDay, MyMonth, MyYear) = True THEN Trace(MyDay, MyMonth, MyYear) ELSE Error("The date format is invalid") END
ADay is string AMonth is string AYear is string ATime is string DateToCheck is string = "Tue, 11 Apr 2006 18:25:09 +0200" IF MatchRegularExpression(DateToCheck, ... "[A-Za-z]{3,3}[,] ([0-9]{1,2}) ([A-Za-z]{3,3}) " +... "([0-9]{4,4}) ([0-9]{2,2}[:][0-9]{2,2}[:][0-9]{2,2}) [\+][0-9]{4,4}", ... ADay, AMonth, AYear, ATime) = False THEN Info("Invalid date") ELSE Info("Valid date", "Day: " + ADay," Month:" + AMonth, "Year: " + AYear, "Time: " + ATime) END
Diff, R1, R2 are real Diff = 0.00001 IF Abs(1-(R1/R2)) < Diff THEN ELSE END
MyArray is array of 5 strings I is int MyArray[1] = "Smith" MyArray[2] = "Aida" MyArray[3] = "Parapoline" MyArray[4] = "Moulin" MyArray[5] = "Clark" FOR I = 1 TO 5 IF "B" < MyArray[I] <= "M" THEN Trace(MyArray[I])
END
O is ST1 P is ST2
P1 is dynamic structure ST1 P1 = O P2 is dynamic structure ST2 P2 = O
IF P1 = P2 THEN ...
Object1 is dynamic Class1 Object2 is dynamic Class2 BufferObject1, BufferObject2 are Buffers
Object1 = new Class1 Object2 = new Class2
Serialize(Object1, BufferObject1, psdBinary) Serialize(Object2, BufferObject2, psdBinary)
IF BufferObject1 = BufferObject2 THEN ELSE END
MyValue is int MyResult is boolean MyValue = 10 MyResult = (MyValue IN(1,4,6,10))
MyValue is int MyOtherValue is int MyResult is boolean MyValue = 10 MyOtherValue = 15 MyResult = (MyValue IN(1,4,6,10,MyOtherValue))
The following characters can also be used IN the format:
TAB to check the presence of a tabulation. For example: MatchRegularExpression(sString, "1" + TAB + "2") CR to check the presence of a Carriage RETURN. For example: MatchRegularExpression(sString, "1" + CR + "2")
http: |
| |
| |
| | | |
|
| | | | |
| | |
|