Results 1 to 3 of 3
Thread: data type validation
- 12-14-2011, 07:08 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 11
- Rep Power
- 0
- 12-14-2011, 07:52 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,543
- Rep Power
- 11
Re: data type validation
Not without special hardware which is not common on most PCs, and illegal in many jurisdictions.
A better approach is to not accept the bad data they do enter. For example you might ask for a telephone number and when they have entered it check to see if it conforms to your expectations.
Many would argue better (and possibly what you were getting at) is to use a GUI component like JFormattedTextField which restricts the value of user entered strings. (It is described in Oracle's Tutorial at the page How to Use Formatted Text Fields). Another approach - which could be used with any text component - is to set a document filter. (Its use is also described in the Tutorial: here.)
- 12-14-2011, 07:57 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Re: data type validation
So basically there is no specific way to do this. Depends on the controls you are using and the design, we can take different approaches. However, if we consider web applications we are more towards to do the validations on client-side and try to avoid overheads on servers. When comes to the desktop application anyway life is more easy.
Similar Threads
-
Matrix Data Type
By fraB3422 in forum New To JavaReplies: 7Last Post: 02-27-2011, 02:08 AM -
Tokenizer with data validation for missing text
By dug in forum New To JavaReplies: 4Last Post: 01-29-2011, 11:18 PM -
which type is a good validation method in struts2
By javastuden in forum Java ServletReplies: 2Last Post: 07-13-2010, 01:25 PM -
how to set NVarchar data type
By edi.gotieb in forum JDBCReplies: 9Last Post: 05-19-2010, 01:13 PM -
Connection to SQL Server and Data Validation
By hisouka in forum JDBCReplies: 0Last Post: 09-01-2008, 11:57 AM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks