9 Replies Latest reply on Nov 26, 2006 4:35 PM by Richard Leherpeur

    i18n validation message during test

    Pierre Raoul Novice


      I'm trying to add i18n messages to booking example, something like:

      @Length(min=16, max=16, message="#{messages['booking.credit.card.number.wrong.length']}")
      @Pattern(regex="^\\d*$", message="#{messages['booking.credit.card.number.invalid']}")
      public String getCreditCard()
      return creditCard;

      It's work fine when I work with a navigator. But during the test, BookingTest.renderResponse fails. The string returned by
      ( (FacesMessage) messages.next() ).getSummary()
      and not the pattern associated with the key "booking.credit.card.not.null".

      Is it the expected behavior?