You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by samlai <sy...@gmail.com> on 2008/03/27 15:30:04 UTC

Input Validation on Server Side?

A typical <t:textfield t:id="foo" t:validate="required" size="5"/>
automatically produce client-side validation.  Just wondering whether it
produce server-side validation counterparts and enforce on the server-side
as well?  Obviously, it goes from Tapestry validation language to
JavaScript.  I'd think it shouldn't be hard to automatically generate that
same logic in Java and enforce on the server-side as well.  Thanks.
-- 
View this message in context: http://www.nabble.com/Input-Validation-on-Server-Side--tp16325244p16325244.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Input Validation on Server Side?

Posted by samlai <sy...@gmail.com>.
Thanks guys.  Server-side validation is a must.  Whatever makes it easy is
doing the right thing.

However, I'm disappointed to find a flaw.  I was able to manually edit the
selection values in the html and submit without a problem.  I'd expect
Tapestry to enforce the selection to be only the elements in the selection
model.  It'd suck if I have to manually check that for every selection
inputs.



Robert Zeigler wrote:
> 
> Yes, tapestry's built-in validators validate both client and server- 
> side.
> 
> Robert
> 
> On Mar 27, 2008, at 3/279:30 AM , samlai wrote:
>>
>> A typical <t:textfield t:id="foo" t:validate="required" size="5"/>
>> automatically produce client-side validation.  Just wondering  
>> whether it
>> produce server-side validation counterparts and enforce on the  
>> server-side
>> as well?  Obviously, it goes from Tapestry validation language to
>> JavaScript.  I'd think it shouldn't be hard to automatically  
>> generate that
>> same logic in Java and enforce on the server-side as well.  Thanks.
>> -- 
>> View this message in context:
>> http://www.nabble.com/Input-Validation-on-Server-Side--tp16325244p16325244.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Input-Validation-on-Server-Side--tp16325244p16345731.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Input Validation on Server Side?

Posted by Robert Zeigler <ro...@scazdl.org>.
Yes, tapestry's built-in validators validate both client and server- 
side.

Robert

On Mar 27, 2008, at 3/279:30 AM , samlai wrote:
>
> A typical <t:textfield t:id="foo" t:validate="required" size="5"/>
> automatically produce client-side validation.  Just wondering  
> whether it
> produce server-side validation counterparts and enforce on the  
> server-side
> as well?  Obviously, it goes from Tapestry validation language to
> JavaScript.  I'd think it shouldn't be hard to automatically  
> generate that
> same logic in Java and enforce on the server-side as well.  Thanks.
> -- 
> View this message in context: http://www.nabble.com/Input-Validation-on-Server-Side--tp16325244p16325244.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Input Validation on Server Side?

Posted by Igor Drobiazko <ig...@gmail.com>.
Just disable JavaScript and you will see that client side validation is
duplicated with server-side one.

On Thu, Mar 27, 2008 at 3:30 PM, samlai <sy...@gmail.com> wrote:

>
> A typical <t:textfield t:id="foo" t:validate="required" size="5"/>
> automatically produce client-side validation.  Just wondering whether it
> produce server-side validation counterparts and enforce on the server-side
> as well?  Obviously, it goes from Tapestry validation language to
> JavaScript.  I'd think it shouldn't be hard to automatically generate that
> same logic in Java and enforce on the server-side as well.  Thanks.
> --
> View this message in context:
> http://www.nabble.com/Input-Validation-on-Server-Side--tp16325244p16325244.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko