diff --git a/CHANGELOG.md b/CHANGELOG.md index a0ef02f..1c06539 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # SAFE Hosting Manager App Change Log +## [Unreleased] +### Changed +- Remove the requirement of min 3 characters for public names and service names + +### SAFE libraries dependencies +- @maidsafe/safe-node-app: v0.10.1 + ## [0.5.1] - 6-12-2018 ### Changed - Upgrade `@maidsafe/safe-node-app` to v0.10.1 diff --git a/app/constants.js b/app/constants.js index 6193c6e..6515a2e 100644 --- a/app/constants.js +++ b/app/constants.js @@ -137,8 +137,8 @@ const CONSTANTS = { NO_SUCH_ENTRY: 'Data not found', ENTRY_EXISTS: 'Data already exists', NO_SUCH_KEY: 'Unable to fetch data', - INVALID_PUBLIC_NAME: 'Public ID must contain only lowercase alphanumeric characters. Should contain a min of 3 characters and a max of 62 characters', - INVALID_SERVICE_NAME: 'Service name must contain only lowercase alphanumeric characters. Should contain a min of 3 characters and a max of 62 characters', + INVALID_PUBLIC_NAME: 'Public ID must contain only lowercase alphanumeric characters. Should contain a max of 62 characters', + INVALID_SERVICE_NAME: 'Service name must contain only lowercase alphanumeric characters. Should contain a max of 62 characters', }, }, }; diff --git a/app/utils/app.js b/app/utils/app.js index b65ba96..742ef2a 100644 --- a/app/utils/app.js +++ b/app/utils/app.js @@ -3,7 +3,7 @@ import CONSTANTS from '../constants'; // domain check for public name and service name export const domainCheck = (str) => { - const regex = /^[a-z0-9][a-z0-9-]{1,60}[a-z0-9](?:)+$/; + const regex = /^[a-z0-9]{1,62}(?:)+$/; return regex.test(str); };