Proper Field Validation Methods and other annoyances...

Björnke von Gierke bvg at mac.com
Tue Aug 14 13:20:17 EDT 2007


On 14 Aug 2007, at 18:54, Ken Ray wrote:

>> 1) Why does  put "4" is a date return true?  If this function doesn't
>> actually work, why is it still available?  I'd like to be able to
>> have users enter a date without any kind of punctuation (i.e.,
>> 08142007) and be able to validate it as a valid date.  The same
>> applies to entering 1315 as a time (no colon).
>
> This is something I asked earlier, and basically since "the seconds" is
> a valid date, the "is a date" test returns true for any positive
> integer. However I made the argument that it should be at least 10
> digits, but that hasn't been adopted yet.

Wow that'd be seriously evil. Just imagine the help calls when suddenly 
date stuff stops working because one number is too small, or too big, 
or the moon isn't full! Either have it removed from "is a date", or 
leave it as is.  Can you tell me where you suggested that, so I can put 
in an opposite comment?

As for really fixing "is a date" Ideally one could specify what should 
evaluate true as a date (and there should be "is a time" too), with the 
local date format as the default. Actually I liked this idea so much, i 
went and made a feature request (bug 5300).

Bjoernke

-- 

official ChatRev page:
http://chatrev.bjoernke.com

Chat with other RunRev developers:
go stack URL "http://homepage.mac.com/bvg/chatrev1.3.rev"




More information about the use-livecode mailing list