B4A Class Validation module [B4X]

Hi
I share my module for validation data
Contain many function about validate email,mobile and other
Please develop it :cool:
 

Attachments

  • Validation.bas
    4.6 KB · Views: 269

AHilton

Active Member
Licensed User
Longtime User
Thanks for the contribution. But, it needs work (I assume that's why the "Please develop it" in your post).

B4X:
    Log(Validation.IsDate("02-01-2003"))                ' Returns False = WRONG
    Log(Validation.IsDate("01/01/2003"))                ' Returns False = WRONG
    Log(Validation.IsDate("2010-32-88"))                ' Returns True = WRONG

    Log(Validation.IsDateTime("02-01-2003 04:23:18"))    ' Returns False = WRONG
    Log(Validation.IsDateTime("01/01/2003 04:23:18"))    ' Returns False = WRONG
    Log(Validation.IsDateTime("2010-03-22 55:18:75"))    ' Returns True = WRONG
    Log(Validation.IsDateTime("2010-03-22 01:01:01"))    ' Returns True = Right
    Log(Validation.IsDateTime("2010-32-88 01:01:01"))    ' Returns True = WRONG

I stopped testing after that.

Also, please put [B4X] in your thread title as it can (mostly) be used in the other B4X tools as well and that will help in the forum searches.
 

Pooya1

Active Member
Licensed User
Thanks for the contribution. But, it needs work (I assume that's why the "Please develop it" in your post).

B4X:
    Log(Validation.IsDate("02-01-2003"))                ' Returns False = WRONG
    Log(Validation.IsDate("01/01/2003"))                ' Returns False = WRONG
    Log(Validation.IsDate("2010-32-88"))                ' Returns True = WRONG

    Log(Validation.IsDateTime("02-01-2003 04:23:18"))    ' Returns False = WRONG
    Log(Validation.IsDateTime("01/01/2003 04:23:18"))    ' Returns False = WRONG
    Log(Validation.IsDateTime("2010-03-22 55:18:75"))    ' Returns True = WRONG
    Log(Validation.IsDateTime("2010-03-22 01:01:01"))    ' Returns True = Right
    Log(Validation.IsDateTime("2010-32-88 01:01:01"))    ' Returns True = WRONG

I stopped testing after that.

Also, please put [B4X] in your thread title as it can (mostly) be used in the other B4X tools as well and that will help in the forum searches.
Oh yes date have problem
I edit it future Thanks
 
Top