Re: Validate a user entry
Re: Validate a user entry
- Subject: Re: Validate a user entry
- From: Jens Bauer <email@hidden>
- Date: Wed, 19 Dec 2001 16:03:59 +0100
Hi Michhle,
I'm only giving some slight advice here, about something that you should
consider when writing a field-validating dialogbox:
>
It works only (not surprisingly) when the user enters a value in the
>
field.
>
>
Should I implement a second method so that it works also when the user
>
tabs through the field without entering a value. Which method and how
>
to implement it ?
If you've ever tried entering a dotted-decimal IP address in a dialog-box,
where the IP address syntax is checked before you can leave the field
(especially happens on Windows, but also in Mac OS 9's TCP/IP control
panel), you will find out it's annoying that you can't leave a field, that
is not correct. (Another example is ResEdit, where the TMPL's are invalid,
due to they were made in resorcerer)
1: Imagine you have 2 fields. The application placed an invalid value in one
of the fields. The user does not know what's required for the field to
validate, or (s)he does not know what to type in the field.
2: Field number 2 is controlling the syntax of field number 1. The user
is to fill in field number 1, before (s)he can fill in field number 2.
field number 2 contains an old setting, that cannot allow the user to
type what he wants, and *then* correct the values for field number 1.
(TCP/IP: Subnet mask and router address controls whether you can enter
an IP address in the same subnet as the router. You have to change the
router address first, then enter your IP address. That requires you
to enter a dummy IP address, before changing the router address and
*then* change the IP address to what you want)
A possible solution:
When the user clicks "OK" or "Apply" or "Confirm", you check the syntax of
all the fields. Give focus to the field that is incorrect, and put a
messageText somewhere in the dialog, that explains what's wrong with the
field. Such a messageText is often known from a Web-browser, when your
mouse is over a link, it shows the real URL, it also displays the status,
progress and error-messages.
>
And a third one when the user adds the record (in case he did not even
>
go into the field). Again which method and how to implement it.
I'd implement the mentioned error-checking when the user is about to leave
the dialogbox, eg. pressing OK, Apply or Confirm. -Do not check, when the
user press Cancel or Abort.
>
Any help would be greatly appreciated.
I hope you can use my opinion...
Love,
Jens