RE: How To Check Attribute's Width Programmatically?
RE: How To Check Attribute's Width Programmatically?
- Subject: RE: How To Check Attribute's Width Programmatically?
- From: <email@hidden>
- Date: Fri, 6 Feb 2004 14:03:58 +0100
- Thread-topic: How To Check Attribute's Width Programmatically?
Alternatively, you might want to try a complete validation of the attribute:
eo.validateValueForKey(value, key);
Pierre
-----Original Message-----
From: email@hidden [mailto:email@hidden]
Sent: Thursday, February 05, 2004 11:07 PM
To: email@hidden; email@hidden
Subject: How To Check Attribute's Width Programmatically?
I realize you can set and get attributes of an entity or table programmatically (using either takeValueForKey or valueForKey())
I would however like to retrieve the maximum possible width of the attribute in my program. I ask this because of so : I have an attribute first_name in my table Subscribers. Its width attribut is 150 varchar2().
Now when subscribers are entering the first_name field through the web interface I would like to do some length check (what if the subscriber enters a name longer than 150 characters?) (please bear with me this is just an example albiet a bad one)
In my validation mathod I would like to check if the string entered is greater than the set width of the field of the table (whatever it may be). I can put in a preset 150 characters but that is no fun (because if you change the character width later on you will have to go through the code and change all instance of 150 character width).
Is it possible to retrieve the width of an attribute in the program ?
A. Shiraz
44 Executive Boulevard
Elmsford, NY 10523
(914) 592- 4203 x268
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender
of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.