diff --git a/services/project_service/src/java/main/com/topcoder/service/project/impl/ProjectServiceBean.java b/services/project_service/src/java/main/com/topcoder/service/project/impl/ProjectServiceBean.java index c28ec8cc6..89613cd97 100644 --- a/services/project_service/src/java/main/com/topcoder/service/project/impl/ProjectServiceBean.java +++ b/services/project_service/src/java/main/com/topcoder/service/project/impl/ProjectServiceBean.java @@ -1996,13 +1996,13 @@ private void checkProjectData(ProjectData projectData, boolean isCreate) throws throw logException(new IllegalArgumentFault("The name attribute of the project data can not be null.")); } else if (name.trim().length() == 0) { throw logException(new IllegalArgumentFault("The name attribute of the project data can not be empty.")); + } else if (name.trim().length() > 200) { + throw logException(new IllegalArgumentFault("The name attribute of the project data cannot be more than 200 characters.")); } String description = projectData.getDescription(); - if (null == description) { - throw logException(new IllegalArgumentFault("The description attribute of the project data can not be null.")); - } else if (description.trim().length() == 0) { - throw logException(new IllegalArgumentFault("The description attribute of the project data can not be empty.")); + if (null != description && description.trim().length() > 10000) { + throw logException(new IllegalArgumentFault("The description attribute of the project data cann't be more than 10000 characters.")); } //added in version 2.2 diff --git a/src/web/scripts/common.js b/src/web/scripts/common.js index 8c5247d83..8142e9f2e 100644 --- a/src/web/scripts/common.js +++ b/src/web/scripts/common.js @@ -112,11 +112,9 @@ $(document).ready(function() { $("#swFileDescription, #fileDescription, #fileDescription2").bind('keydown keyup paste', limitFileDescriptionChars(200)); - $("#newProjectDescription").bind('keydown keyup paste', limitFileDescriptionChars(2000)); + $("#newProjectDescription").bind('keydown keyup paste', limitFileDescriptionChars(10000)); }); -var invalidCharsRegExp = /[^a-zA-Z0-9\$!\(\)\[\]\'\"\-\.\,\/\+ ]+/mg; - var DEFAULT_TIMEZONE = "America/New_York"; /**