Re: How can I put validations on NSTimeStamp

brahma the legend <[email protected]>
Newsgroups gmane.comp.web.webobjects.newbies
Message-ID <[email protected]>
Thanx for u r help kaj.
I went through the link and understood the program in that page.What did in that page was
year was restricted so that the value of year must be in between 2 values.Its o k.
But my problem is if I give month as 23 it will accept !!
If I give day as 45 it accepts too....
By default it round off the given input in textbox so,when i access the variable
in code the month becomes 11 and day becomes 14.
So, for date validation purpose,what i did was i bound a WOString to date text box and 
and accept the given date and validate the string for correct date.IF date is correct then i will create NSTimestamp object from that string. I wrote logic for
doing this.Now i can restrict the users so that the can't enter date more than 31,month
more than 12.I want to know whether it is the only way for doing this or any other easy  procedure exists.I am very much interested for u r valuable suggestions..
Brahma..


Kaj Hejer <[email protected]> wrote:
On 25. feb 2005, at 06.15, brahma the legend wrote:
> Hi friends,
>  This is my first message to the group.I have a problem with 
> NSTimestamp.
>  What i did was I created a text field and binds an NSTimestamp object 
> to it.
> Also i specified the date format as"mm/dd/yyyy".But if I give the 
> month whose value
> is invalid(more than 12),day(more than 31), it accepts it and changes 
> it to a correct value
> by taking offset value.I searched whole API for  fixing the 
> problem.But i cant find it.
>


Hi!

See <url:http://www.stepwise.com/Articles/Technical/2001-06-13.01.html>.


-Kaj :)


Yahoo! Groups SponsorADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/webobjects-newbies/
  
   To unsubscribe from this group, send an email to:
[email protected]
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


		
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - Easier than ever with enhanced search. Learn more.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.