B4A Class Validation module [B4X]

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

Code: Copy
    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.
 
Thanks for the contribution. But, it needs work (I assume that's why the "Please develop it" in your post).

Code: Copy
    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
 
Back
Top