The 60 is already defined in FieldValidator. Try to reuse that here.  e.g.
...less than " + FieldValidator.VAR_NAME + " characters.
That way, the error message will stay in sync with the actual size limit.


On Thu, May 8, 2014 at 7:32 PM, franklingu <notifications@github.com> wrote:

> In src/main/java/teammates/common/util/Const.java:
>
> > @@ -679,6 +679,8 @@
> >          public static final String COURSE_COURSE_NAME_EMPTY = "Course name cannot be empty";
> >          public static final String COURSE_INSTRUCTOR_LIST_EMPTY = "Instructor list cannot be empty";
> >          public static final String COURSE_INVALID_ID = "Please use only alphabets, numbers, dots, hyphens, underscores and dollar signs in course ID.";
> > +        public static final String COURSE_STUDENTNAME_INVALID = "Name should only consist of alphanumerics or hyphens, apostrophes, fullstops, commas, slashes, round brackets\nand not more than 40 characters.";
> > +        public static final String COURSE_TEAMNAME_INVALID = "Team name should contain less than 60 characters.";
>
> I am not following. So you mean a variable "max_length_for_team_name" = 60?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/TEAMMATES/repo/pull/1815/files#r12424213>
> .
>