Skip to main content
  • 810 Accesses

Summary

Spring offers an excellent validation framework. The Validator and Errors interface form the backbone and allow you to write your own Validator implementations. If you’d rather use declarative validation, have a look at Valang. This framework creates a Spring Validator instance based on a set of constraints defined in its proper validation language. Valang is very convenient to quickly write constraints for your command classes. Its operators, functions, and date parser functionalities offer more power and flexibility than Validators written in Java. Whether you write your Validators in Java or Valang, you should always test them to check whether all error conditions are rejected properly.

Next to validation Spring also offers support for internationalization through its MessageSource interface. This interface will resolve messages for the locale of your users so that you can offer your applications in their languages.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Seth Ladd, Darren Davison, Steven Devijver, and Colin Yates

About this chapter

Cite this chapter

(2006). Validation. In: Expert Spring MVC and Web Flow. Apress. https://doi.org/10.1007/978-1-4302-0133-5_9

Download citation

Publish with us

Policies and ethics