Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-207

Improve the message given when a field is too long (exceeds its @MaxLength value)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.2.0-incubating, core-1.0.0
    • core-1.1.0
    • Core
    • None

    Description

      The value is repeated stating it is too long. This is particularly bad for a long entry, and the value itself is probably not needed anyway.

      Problem is in MaxLengthFacetAbstract.java in the return statement.

      @Override
      public String invalidates(final ValidityContext<? extends ValidityEvent> context) {
      if (!(context instanceof ProposedHolder))

      { return null; }
      final ProposedHolder proposedHolder = (ProposedHolder) context;
      final ObjectAdapter proposedArgument = proposedHolder.getProposed();
      if (!exceeds(proposedArgument)) { return null; }

      return "Proposed value '" + proposedArgument.titleString() + "' exceeds the maximum length of " + value();
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            rmatthews Robert Charles Matthews
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: