Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

validation within xml

Status
Not open for further replies.

pip12345

Technical User
Sep 2, 2005
4
FR
Can anyone tell help me...
We have a cms that is xsl/xml based.
We have a form that has a text area that should only allow numbers.
What do I have to add to the xml to allow 'only' numbers and not any other characters?

We have some nodes in our xml called <FieldRules> where we can prompt if inputted information is incorrect.

Any help would be really appreciated.
thanks
 
The xml that I'd like to change to to check for numbers only... no other type of characters allowed.
If date is a required field I added this field rules snippet.... but I want to change this so that I check & allow numbers only:

<FieldRules>
<PSXFieldValidationRules maxErrorsToStop="10" name="validDateTime">
<PSXRule boolean="and">
<PSXConditional id="1">
<variable>
<PSXSingleHtmlParameter id="0">
<name>sys_????date</name>
</PSXSingleHtmlParameter>
</variable>
<operator>LIKE</operator>
<value>
<PSXTextLiteral id="0">
<text>____-__-__%</text>
</PSXTextLiteral>
</value>
<boolean>AND</boolean>
</PSXConditional>
</PSXRule>
<PSXApplyWhen ifFieldEmpty="yes">
<PSXRule boolean="and">
<PSXConditional id="2">
<variable>
<PSXTextLiteral id="0">
<text>1</text>
</PSXTextLiteral>
</variable>
<operator>=</operator>
<value>
<PSXTextLiteral id="0">
<text>1</text>
</PSXTextLiteral>
</value>
<boolean>AND</boolean>
</PSXConditional>
</PSXRule>
</PSXApplyWhen>
<ErrorMessage>
<PSXDisplayText>This field must be a valid date and time in the format 2003-09-28 or 2003-09-28 12:00:00</PSXDisplayText>
</ErrorMessage>
</PSXFieldValidationRules>
</FieldRules>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top