You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Umesh Awasthi <um...@gmail.com> on 2013/10/23 19:44:14 UTC

[ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Hi All,

I am pleased to announce that  Struts2-Jsr303-Validation-Plugin is
available.
This Plugin works as a bridge between Struts2  and JSR-303 Compliant bean
Validator.
Some of reference implementation for JSR303 are


   - Hibernate bean validator
   - Apacche Bval

You can either download it through maven central repository or can manually
download and configure it in your application.


In case you find any bugs, please them report them at Github Issue
Tracker<https://github.com/umeshawasthi/jsr303-validator-plugin/issues?state=open>
.

For more details, please refer to the plugin's home page
struts2-JSR303-validator-plugin<https://github.com/umeshawasthi/jsr303-validator-plugin>

Looking for your feedback / suggestions / inputs

-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/

Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by Umesh Awasthi <um...@gmail.com>.
Thanks for the post and everything seems to be in-place :)
One point which even i missed on plugin page is about using XML file for
validation.

Will update plugin page soon with this information.

Thanks
Umesh


On Tue, Oct 29, 2013 at 7:13 PM, bphillips@ku.edu <bp...@ku.edu> wrote:

> Umesh:
>
>    Here is the link to the blog entry I wrote:
>
>
>
> http://www.brucephillips.name/blog/index.cfm/2013/10/29/New-Struts-2-Plugin-For-JSR-303-Bean-Validation
>
>    Please let me know if I need to make any changes.
>
>    Thanks again for all the work you put into creating this plugin.
>
> Bruce
>
>
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714498.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/

Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by "bphillips@ku.edu" <bp...@ku.edu>.
Umesh:

   Here is the link to the blog entry I wrote:

  
http://www.brucephillips.name/blog/index.cfm/2013/10/29/New-Struts-2-Plugin-For-JSR-303-Bean-Validation

   Please let me know if I need to make any changes.

   Thanks again for all the work you put into creating this plugin.

Bruce



--
View this message in context: http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714498.html
Sent from the Struts - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by um...@gmail.com.
Plugin work only with underlying bean validator and does not take in to account struts2 validation.

Beside I believe that JSR303 in itself will be able to handle all use cases.

 we can merge struts2 validation and JSR303 validation results in future release.
Sent from BlackBerry® on Airtel

-----Original Message-----
From: "bphillips@ku.edu" <bp...@ku.edu>
Date: Mon, 28 Oct 2013 06:43:56 
To: <us...@struts.apache.org>
Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
Subject: Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Umesh:

    Does the JSR303 Validation Plugin work with Struts 2 XML validation?

    In my example project the validation plugin is working but the XML
validation I have is not being executed.

    See:  http://www.stfm.org/test/jsr303_validation.zip 

    Besides the validation annotations applied to the model class - I also
have XML validation setup (regex to check format of the phone number and
OGNL expression to ensure the that at least one car model is checked).  The
model class annotations are being enforced but not the XML validations.

Bruce

     



--
View this message in context: http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714464.html
Sent from the Struts - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by "bphillips@ku.edu" <bp...@ku.edu>.
Umesh:

    Does the JSR303 Validation Plugin work with Struts 2 XML validation?

    In my example project the validation plugin is working but the XML
validation I have is not being executed.

    See:  http://www.stfm.org/test/jsr303_validation.zip 

    Besides the validation annotations applied to the model class - I also
have XML validation setup (regex to check format of the phone number and
OGNL expression to ensure the that at least one car model is checked).  The
model class annotations are being enforced but not the XML validations.

Bruce

     



--
View this message in context: http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714464.html
Sent from the Struts - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by Umesh Awasthi <um...@gmail.com>.
Hi Bruce,

I will be more than happy , let me know if i can contribute in any form?
I also need to update Github information as still XML based validation
information is missing from there.

Thanks
Umesh


On Sat, Oct 26, 2013 at 3:48 AM, Paul Benedict <pb...@apache.org> wrote:

> JSR-303 validation should be the norm for Struts 3.
>
>
> On Fri, Oct 25, 2013 at 1:53 PM, bphillips@ku.edu <bp...@ku.edu>
> wrote:
>
> > Works now - thank you for the help and for creating a very useful plugin.
> >
> > Would you mind if I wrote an article about how to use this plugin for my
> > blog (http://www.brucephillips.name/blog)?
> >
> > Bruce
> >
> >
> >
> > --
> > View this message in context:
> >
> http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714436.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> Cheers,
> Paul
>



-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/

Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by Paul Benedict <pb...@apache.org>.
JSR-303 validation should be the norm for Struts 3.


On Fri, Oct 25, 2013 at 1:53 PM, bphillips@ku.edu <bp...@ku.edu> wrote:

> Works now - thank you for the help and for creating a very useful plugin.
>
> Would you mind if I wrote an article about how to use this plugin for my
> blog (http://www.brucephillips.name/blog)?
>
> Bruce
>
>
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714436.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Cheers,
Paul

Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by "bphillips@ku.edu" <bp...@ku.edu>.
Works now - thank you for the help and for creating a very useful plugin.  

Would you mind if I wrote an article about how to use this plugin for my
blog (http://www.brucephillips.name/blog)?

Bruce



--
View this message in context: http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714436.html
Sent from the Struts - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by Umesh Awasthi <um...@gmail.com>.
Hi Bruce,

Only thing you were missing is to tell Underlying bean Validator to
validate your bean.
You placed constraints on your Person bean , but you need to indicate that
you want to validate this bean

In you EditAction.java you need to add @Valid annotation like

@Valid
 private Person personBean;

Thanks
Umesh




On Fri, Oct 25, 2013 at 7:05 PM, bphillips@ku.edu <bp...@ku.edu> wrote:

> I've modified one of my form processing example applications to include
> this
> plugin.  It is not working as it allows you to not enter a value for first
> name even though I've annotated it with @Size(min=5).
>
> I double-checked that I'm following all the steps you listed in your
> ReadMe.md file at GitHub but it very possible I missed something.
>
> Could you look over this project:
> http://www.stfm.org/test/jsr303_validation.zip (unzip it - it's Maven
> project) and let me know what I've not done correctly.
>
> Thank you,
>
> Bruce Phillips
>
>
>
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714434.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/

Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by "bphillips@ku.edu" <bp...@ku.edu>.
I've modified one of my form processing example applications to include this
plugin.  It is not working as it allows you to not enter a value for first
name even though I've annotated it with @Size(min=5).

I double-checked that I'm following all the steps you listed in your
ReadMe.md file at GitHub but it very possible I missed something.

Could you look over this project: 
http://www.stfm.org/test/jsr303_validation.zip (unzip it - it's Maven
project) and let me know what I've not done correctly.

Thank you,

Bruce Phillips




--
View this message in context: http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714434.html
Sent from the Struts - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by Umesh Awasthi <um...@gmail.com>.
Hi Martin,

I am not able to understand your question properly.
Can you be a more descriptive for this?

Any example or references can help me ;)

Thanks
Umesh


On Thu, Oct 24, 2013 at 5:26 PM, Martin Gainty <mg...@hotmail.com> wrote:

> If the implementor has predefined Validators and implementor wishes to
> engage that specific validator at runtime
> (leaving default struts.jsr303.beanValidator.providerClass for other
> validators)
>
> @Constraint(validatedBy = CommentValidator.class)
>
>
> How would that work?
>
>
>
> thanks umesh!
> Martin
>
>
>
> http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.nd.doc%2Finfo%2Fae%2Fae%2Fcdat_beanval.html
>
>
>
>
>
> > Date: Thu, 24 Oct 2013 11:00:58 +0200
> > Subject: Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available
> > From: jogep@apache.org
> > To: user@struts.apache.org
> >
> > Thanks Umesh, looks like a great benefit for all Struts users!
> > I will give it a try in my next project.
> >
> > Johannes
> >
> > #################################################
> > web: http://www.jgeppert.com
> > twitter: http://twitter.com/jogep
> >
> >
> >
> > 2013/10/24 Lukasz Lenart <lu...@apache.org>
> >
> > > Great! Congratz!
> > >
> > > 2013/10/23 Umesh Awasthi <um...@gmail.com>:
> > > > Hi All,
> > > >
> > > > I am pleased to announce that Struts2-Jsr303-Validation-Plugin is
> > > > available.
> > > > This Plugin works as a bridge between Struts2 and JSR-303 Compliant
> bean
> > > > Validator.
> > > > Some of reference implementation for JSR303 are
> > > >
> > > >
> > > > - Hibernate bean validator
> > > > - Apacche Bval
> > > >
> > > > You can either download it through maven central repository or can
> > > manually
> > > > download and configure it in your application.
> > > >
> > > >
> > > > In case you find any bugs, please them report them at Github Issue
> > > > Tracker<
> > >
> https://github.com/umeshawasthi/jsr303-validator-plugin/issues?state=open>
> > > > .
> > > >
> > > > For more details, please refer to the plugin's home page
> > > > struts2-JSR303-validator-plugin<
> > > https://github.com/umeshawasthi/jsr303-validator-plugin>
> > > >
> > > > Looking for your feedback / suggestions / inputs
> > > >
> > > > --
> > > > With Regards
> > > > Umesh Awasthi
> > > > http://www.travellingrants.com/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
>
>



-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/

RE: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by Martin Gainty <mg...@hotmail.com>.
If the implementor has predefined Validators and implementor wishes to engage that specific validator at runtime
(leaving default struts.jsr303.beanValidator.providerClass for other validators)
 
@Constraint(validatedBy = CommentValidator.class)


How would that work?

 

thanks umesh!
Martin 


http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.nd.doc%2Finfo%2Fae%2Fae%2Fcdat_beanval.html

  



> Date: Thu, 24 Oct 2013 11:00:58 +0200
> Subject: Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available
> From: jogep@apache.org
> To: user@struts.apache.org
> 
> Thanks Umesh, looks like a great benefit for all Struts users!
> I will give it a try in my next project.
> 
> Johannes
> 
> #################################################
> web: http://www.jgeppert.com
> twitter: http://twitter.com/jogep
> 
> 
> 
> 2013/10/24 Lukasz Lenart <lu...@apache.org>
> 
> > Great! Congratz!
> >
> > 2013/10/23 Umesh Awasthi <um...@gmail.com>:
> > > Hi All,
> > >
> > > I am pleased to announce that Struts2-Jsr303-Validation-Plugin is
> > > available.
> > > This Plugin works as a bridge between Struts2 and JSR-303 Compliant bean
> > > Validator.
> > > Some of reference implementation for JSR303 are
> > >
> > >
> > > - Hibernate bean validator
> > > - Apacche Bval
> > >
> > > You can either download it through maven central repository or can
> > manually
> > > download and configure it in your application.
> > >
> > >
> > > In case you find any bugs, please them report them at Github Issue
> > > Tracker<
> > https://github.com/umeshawasthi/jsr303-validator-plugin/issues?state=open>
> > > .
> > >
> > > For more details, please refer to the plugin's home page
> > > struts2-JSR303-validator-plugin<
> > https://github.com/umeshawasthi/jsr303-validator-plugin>
> > >
> > > Looking for your feedback / suggestions / inputs
> > >
> > > --
> > > With Regards
> > > Umesh Awasthi
> > > http://www.travellingrants.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
 		 	   		  

Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by Umesh Awasthi <um...@gmail.com>.
Thanks Johannes!!
Looking forward for your inputs to improve it :)

Thanks
Umesh


On Thu, Oct 24, 2013 at 2:30 PM, Johannes Geppert <jo...@apache.org> wrote:

> Thanks Umesh, looks like a great benefit for all Struts users!
> I will give it a try in my next project.
>
> Johannes
>
> #################################################
> web: http://www.jgeppert.com
> twitter: http://twitter.com/jogep
>
>
>
> 2013/10/24 Lukasz Lenart <lu...@apache.org>
>
> > Great! Congratz!
> >
> > 2013/10/23 Umesh Awasthi <um...@gmail.com>:
> > > Hi All,
> > >
> > > I am pleased to announce that  Struts2-Jsr303-Validation-Plugin is
> > > available.
> > > This Plugin works as a bridge between Struts2  and JSR-303 Compliant
> bean
> > > Validator.
> > > Some of reference implementation for JSR303 are
> > >
> > >
> > >    - Hibernate bean validator
> > >    - Apacche Bval
> > >
> > > You can either download it through maven central repository or can
> > manually
> > > download and configure it in your application.
> > >
> > >
> > > In case you find any bugs, please them report them at Github Issue
> > > Tracker<
> >
> https://github.com/umeshawasthi/jsr303-validator-plugin/issues?state=open>
> > > .
> > >
> > > For more details, please refer to the plugin's home page
> > > struts2-JSR303-validator-plugin<
> > https://github.com/umeshawasthi/jsr303-validator-plugin>
> > >
> > > Looking for your feedback / suggestions / inputs
> > >
> > > --
> > > With Regards
> > > Umesh Awasthi
> > > http://www.travellingrants.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>



-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/

Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by Johannes Geppert <jo...@apache.org>.
Thanks Umesh, looks like a great benefit for all Struts users!
I will give it a try in my next project.

Johannes

#################################################
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep



2013/10/24 Lukasz Lenart <lu...@apache.org>

> Great! Congratz!
>
> 2013/10/23 Umesh Awasthi <um...@gmail.com>:
> > Hi All,
> >
> > I am pleased to announce that  Struts2-Jsr303-Validation-Plugin is
> > available.
> > This Plugin works as a bridge between Struts2  and JSR-303 Compliant bean
> > Validator.
> > Some of reference implementation for JSR303 are
> >
> >
> >    - Hibernate bean validator
> >    - Apacche Bval
> >
> > You can either download it through maven central repository or can
> manually
> > download and configure it in your application.
> >
> >
> > In case you find any bugs, please them report them at Github Issue
> > Tracker<
> https://github.com/umeshawasthi/jsr303-validator-plugin/issues?state=open>
> > .
> >
> > For more details, please refer to the plugin's home page
> > struts2-JSR303-validator-plugin<
> https://github.com/umeshawasthi/jsr303-validator-plugin>
> >
> > Looking for your feedback / suggestions / inputs
> >
> > --
> > With Regards
> > Umesh Awasthi
> > http://www.travellingrants.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

Posted by Lukasz Lenart <lu...@apache.org>.
Great! Congratz!

2013/10/23 Umesh Awasthi <um...@gmail.com>:
> Hi All,
>
> I am pleased to announce that  Struts2-Jsr303-Validation-Plugin is
> available.
> This Plugin works as a bridge between Struts2  and JSR-303 Compliant bean
> Validator.
> Some of reference implementation for JSR303 are
>
>
>    - Hibernate bean validator
>    - Apacche Bval
>
> You can either download it through maven central repository or can manually
> download and configure it in your application.
>
>
> In case you find any bugs, please them report them at Github Issue
> Tracker<https://github.com/umeshawasthi/jsr303-validator-plugin/issues?state=open>
> .
>
> For more details, please refer to the plugin's home page
> struts2-JSR303-validator-plugin<https://github.com/umeshawasthi/jsr303-validator-plugin>
>
> Looking for your feedback / suggestions / inputs
>
> --
> With Regards
> Umesh Awasthi
> http://www.travellingrants.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org