attached are my validators.xml and CreateBlogAction-valdiation.xml files.
CreateBlogAction being the action I am validating.

I have tried just about every variations of expression I could think of. 






-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Cannon-Brookes
Sent: Tuesday, 17 June 2003 2:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Expression Validation


Toby,

Something must be going wrong. Could you post your entire validation.xml
file here?

Cheers,
Mike

On 17/6/03 2:24 PM, "Toby Hede" ([EMAIL PROTECTED]) penned the
words:

> oh, in my expression string is an action parameter. sorry, made more 
> sense in the orginal context.
> 
> the actual expression is: title.length() > 10
> 
> I can get title.length() ok, but basically ANY expression I have tried 
> (including really simple ones like 4 < 5, 1 != 2) gives nothing at all 
> - no error, no warning, nothing.
> 
> I haven't checked with more recent builds - last checked last week.
> 
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Jason Carreira
> Sent: Tuesday, 17 June 2003 4:26 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [OS-webwork] Expression Validation
> 
> 
> Is this fixed for you yet? Where does string come from? Is this 
> supposed to call getString() on your action?
> 
>> -----Original Message-----
>> From: Toby Hede [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, June 10, 2003 12:12 AM
>> To: [EMAIL PROTECTED]
>> Subject: [OS-webwork] Expression Validation
>> 
>> 
>> I am still having problems with expression valdiation.
>> 
>> basically my 'string.length() > 10' expression doesn't work at all. I 
>> can access string.length() ok (which returns a non-boolean error), 
>> but the minute I have an actual boolean expression nothing happens.
>> 
>> should I place a bug report?
>> 
>> 
>> 
>> 
>> 
>> 
>> -------------------------------------------------------
>> This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
>> best thread debugger on the planet. Designed with thread debugging 
>> features you've never dreamed of, try TotalView 6 free at 
>> www.etnus.com. _______________________________________________
>> Opensymphony-webwork mailing list
>> [EMAIL PROTECTED]
>> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by: eBay
> Great deals on office technology -- on eBay now! Click here: 
> http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
> _______________________________________________
> Opensymphony-webwork mailing list 
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting 
> Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly 
> Commission! INetU Dedicated Managed Hosting 
> http://www.inetu.net/partner/index.php
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Opensymphony-webwork mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
<validators>
    <validator name="required"
        class="com.opensymphony.xwork.validator.validators.RequiredFieldValidator"/>
    <validator name="requiredstring"
        class="com.opensymphony.xwork.validator.validators.RequiredStringValidator"/>
    <validator name="int" 
        class="com.opensymphony.xwork.validator.validators.IntRangeFieldValidator"/>
    <validator name="date" 
        class="com.opensymphony.xwork.validator.validators.DateRangeFieldValidator"/>
    <validator name="expression" 
        class="com.opensymphony.xwork.validator.validators.ExpressionValidator"/>

	<!-- this is my custom string length validator (it works fine) -->    
	<validator name="stringlength" 
		class="ubik.data.StringLengthValidator"/>
</validators>
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0//EN"
        "http://www.opensymphony.com/xwork/xwork-validator-1.0.dtd";>
<validators>
    <field name="title">
        <field-validator type="requiredstring">
            <message>You must enter a value for Title. ${title.length()}</message>
        </field-validator>
        <!--
        <field-validator type="stringlength">
	        <param name="length">10</param>
            <message>Title must be less than 10 characters long.</message>
        </field-validator>       
        -->  
       
   	<field-validator type="expression">
    	<param name="expression">title.length() > 10</param>
    	<message>Title must be less than 10 characters long.</message>
	</field-validator>   
		    
	    
    </field>
    <field name="content">
		<field-validator type="requiredstring">
            <message>You must enter a value for Content.</message>
        </field-validator>
    </field>


<!--
    <validator type="expression">
	    <param name="expression">title.length() == 2</param>
		<message>Title must be less than 10 characters long. Current length is ${title.length()}.</message>
	</validator>  
-->
		
</validators> 

Reply via email to