Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-207

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.2.0-incubating, core-1.0.0
    • Fix Version/s: core-1.1.0
    • Component/s: Core
    • Labels:
      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

            • Assignee:
              Unassigned
              Reporter:
              rmatthews Robert Matthews
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: