You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Dan Haywood (JIRA)" <ji...@apache.org> on 2012/12/17 00:42:12 UTC
[jira] [Updated] (ISIS-207) Improve the message given when a field
is too long (exceeds its @MaxLength value)
[ https://issues.apache.org/jira/browse/ISIS-207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Haywood updated ISIS-207:
-----------------------------
Component/s: Core
Affects Version/s: 0.2.0-incubating
> Improve the message given when a field is too long (exceeds its @MaxLength value)
> ---------------------------------------------------------------------------------
>
> Key: ISIS-207
> URL: https://issues.apache.org/jira/browse/ISIS-207
> Project: Isis
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.2.0-incubating
> Reporter: Robert Matthews
> Priority: Minor
>
> 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();
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira