Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

fix/publicNames: remove the requirement of min 3 characters for public names #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions app/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion app/utils/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down