title: Play for Scala - more than one .verifying criteria when mapping?
body: <p>I'm new to both Scala and Play, currently working through Chapter 2 of '<a href="http://www.manning.com/hilton/" rel="nofollow">Play for Scala</a>' and have a query about the 'Products' application.</p>
  
  <p>The application features a barcode generator that needs a longNumber value with 11 or 12 characters, but there is no validation in place to check that the longNumber has the correct number of characters. This means that the barcode image does not always generate correctly.</p>
  
  <p>Current verification, provided by the book, is:</p>
  
  <pre><code>private val productForm: Form[Product] = Form(
  mapping(
    "ean" -&gt; longNumber.verifying(
      "validation.ean.duplicate", Product.findByEan(_).isEmpty),
    "name" -&gt; nonEmptyText,
    "description" -&gt; nonEmptyText
  )(Product.apply)(Product.unapply)
  )
  </code></pre>
  
  <p>Is there any way to add another set of 'verifying' criteria to the "ean" value? Ideally to check whether "ean" is long enough, and if not display a "validation.ean.length" message.</p>
  
  <p>Many thanks</p>