Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

fValidate - a Kick-Ass JavaScript Validation Library

I found this gem from Ben Alex on the Spring Forums tonight. fValidate looks to be an awesome client-side validation library. If you do a view-source on the aforementioned page, you'll see that all the validation rules are specified in the "alt" attribute of input elements. Apparently this is XHTML valid. Since the current implementation of WebWork in AppFuse doesn't have client-side validation, I may have to hack something together tonight. From the looks of it, this will simply involve adding an "alt" attribute to the existing WebWork tags.

Later: I think I'll pass on the AppFuse/WebWork integration - it looks like a fair amount of work and I'd rather just get 1.6 finished and released.

Posted in Java at Oct 08 2004, 10:46:14 PM MDT 14 Comments
Comments:

You can even specify the error messages using an "emsg" attribute. So you can use exactly the same resource file-derived error messages as used by your server-side Validator implementation. eg:

<@fremerx.formInput "address.addressLine1">
alt="blank"
class="required"
emsg="${springMacroRequestContext.getMessage("required.addressLine1")}"
maxlength="50"
tabindex="1"
</@fremerx.formInput>

(The above is a FreeMarker macro which delegates to resource files for localisation of labels, field help, accesskeys etc.)

Whilst on the subject of pretty good (tm) JavaScript libraries, for client-side table sorting we're using http://webfx.eae.net/dhtml/sortabletable/sortabletable.html. There is a demo link at the bottom of the page. There are many sortable table implementations floating around, but this one happily lives within an XHTML doctype and has a documented API.

Posted by Ben Alex on October 09, 2004 at 06:47 AM MDT #

hey thats pretty sweet, would be a nice option for webwork to have

Posted by francisco hernandez on October 09, 2004 at 07:18 AM MDT #

Ben, do you know how to do this with JSP as the view ? emsg="${springMacroRequestContext.getMessage("required.addressLine1")}" Thanks, Lars

Posted by Lars Fischer on October 09, 2004 at 01:57 PM MDT #

Hi Lars Check out http://www.springframework.org/docs/taglib/tag/MessageTag.html

Posted by Ben Alex on October 09, 2004 at 10:17 PM MDT #

Using the"alt" attribute is only valid in the sense that the markup still validates against the schema. It is definately not valid usage according to the spec, however. See http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html#adef-alt for guidelines of using alt.

Posted by Juha Komulainen on October 10, 2004 at 09:37 AM MDT #

I'm used Fvalidate from a long time and it's awesame. It's very easy to add new validators. By te way, you can define the attributes used to specified the validation rule and the error message in the fvalidate.config.js. By default is "alt" and "emsg", but you can use whatever you want.

fvalidate.config.js:
// Attribute used for fValidate Validator codes
this.code = 'alt';

// Attribute used for custom error messages (override built-in error messages)
this.emsg = 'emsg';

Posted by Rafael Muñoz on October 13, 2004 at 08:34 AM MDT #

Matt, This looks pretty wicked! I might see about integrating this with WebWork rather than rolling our own. Thanks for finding this! Patrick

Posted by Patrick Lightbody on October 13, 2004 at 03:23 PM MDT #

peterbailey.net seems to be down, is there a mirror anywhere?

Posted by Paul Barry on October 19, 2004 at 11:12 PM MDT #

No mirror, but it's back up now.

Posted by Ben Alex on October 29, 2004 at 12:28 AM MDT #

<font color="red">'fValidate'</font> <font color="blue" style="vardana">is Excellent client side Validation tool. I found this through Google. Great work. :-).</font>

Posted by Mohammed Imtiyaz on October 13, 2005 at 10:37 AM MDT #

asAS

Posted by 85.165.50.218 on March 10, 2006 at 10:07 PM MST #

OIPOI

Posted by 203.199.250.194 on May 11, 2007 at 05:28 AM MDT #

That is a complete abuse of the alt tag, as Juha noted. Tag abuse is one of the primary causes of the present sorry state of HTML, so please don't encourage more misuse.

Posted by anonymous on June 01, 2007 at 09:10 PM MDT #

el unico problema es que no permite mutiples tag
    para insertar los errores en una misma pagina.....pero es una buneisima herramienta the problem in FValidate is u cant use multiple tag
      in the same page, but is a toooo good

      Posted by Ronhead on October 09, 2007 at 08:23 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed