bigtoe
Posts: 115
|
Posted: 07/01/2004, 6:17 PM |
|
I have a field called "First_Name".
I made this field required.
So when the user does not provide the First Name,
the following default message is desplayed:
The value in field First Name is required.
How do I change the words "The value in field " ?
This sounds technical.
I would like to change this to:
NOTE: First Name is required.
|
|
|
crecalde
Posts: 13
|
Posted: 07/01/2004, 9:27 PM |
|
This is standard text that is generated for all missing Required Fields. If you want to change it just for the your First_Name field, you will have to hand code a special validation.
I doubt that would be the case, so I won't spend any time on that. On the assumption that you want this same change for any blank Required Fields, you can make that change very easily.
The validation logic is kept in the file "class,php", which you can get to by clicking on Common Files, which is usually the first item you'll see in the Project Explorer list. You'll find the Function Validate() there, and can change the line that reads:
$this->Errors->addError("The value in field " . $FieldName . " is required.");
to:
$this->Errors->addError("Note: " . $FieldName . " is required.");
(If you have not already changed class.php, I believe this is at or near line #523)
Hope this helps,
C.
|
|
|
peterr
Posts: 5971
|
Posted: 07/01/2004, 9:34 PM |
|
The easiest way may be to edit the file English.xml in "C:\Program Files\CodeChargeStudio\Components\Translations\Site\"
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
bigtoe
Posts: 115
|
Posted: 07/01/2004, 11:08 PM |
|
Yes, this helped.
Your suggestions were right on the mark.
Thank you.
|
|
|
bigtoe
Posts: 115
|
Posted: 07/01/2004, 11:15 PM |
|
I understand the suggestions from both crecalde and peterr.
I assume that with crecalde's suggestion my current project would be impacted
and with peterr's suggestions all future projects would be impacted.
Is this correct?
|
|
|
peterr
Posts: 5971
|
Posted: 07/02/2004, 12:49 AM |
|
Generally yes. However you could create several XML files (English1.xml, English2.xml) and use each one for different project.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
Karsten
|
Posted: 08/27/2004, 9:27 PM |
|
what if you want to more precise on each single field?
why did YES not made an option Required Errormessage like for the validationrule ???
|
|
|
Damian
|
Posted: 08/29/2004, 5:16 AM |
|
That is a feature I would like too!
"Karsten" <Karsten@forum.codecharge> wrote in message
news:5413009a4e6604@news.codecharge.com...
> what if you want to more precise on each single field?
> why did YES not made an option Required Errormessage like for the
> validationrule ???
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
Alice K
|
Posted: 08/29/2004, 4:29 PM |
|
For ereally good client side pre-submit validation go find the freeware FValidate scripts.
A google will get you there.
You can have specific message on any field, change the prompt of field in response to validation etc...
Alice
|
|
|