-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move validation regexps to separate common file & add numbers to coin…
… symbol regexp
- Loading branch information
Showing
2 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const CREATE_COIN_VALIDATION_REGEXP = { | ||
COIN_NAME: /^[a-zA-Z0-9\s]+$/, | ||
COIN_SYMBOL: /^[a-zA-Z0-9_]+$/, | ||
TOTAL_SUPPLY: /^\d+$/, | ||
}; | ||
|
||
export const BASE_64_IMAGE_REGEXP = /^data:image\/(png|jpeg|jpg|gif);base64,([A-Za-z0-9+/]+={0,2})$/; | ||
|
||
export const URL_REGEXP = /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters