Skip to content

Commit

Permalink
Fix email validate
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdong262 committed Feb 1, 2019
1 parent f6404d1 commit 6a83490
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const questions = [
name: 'extensionId',
message: 'Enter a unique id for extension, eg: your_extension_name@your_org.com',
validate: (input = '') => {
const pattern = /^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/
const pattern = /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i
if (!pattern.test(input)) {
return 'Please use format as email, eg: your_extension_name@your_org.com'
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ringcentral-embeddable-extension-factory",
"version": "0.2.0",
"version": "0.4.0",
"description": "Cli tool to create a RingCentral Embeddable Voice chrome extension for sites.",
"main": "bin/reef.js",
"bin": {
Expand Down
2 changes: 2 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const testConfig2 = {
npmName: 'my-app2',
description: 'ma-app2',
version: '0.0.1',
browser: 'chrome',
siteMatch: 'https://*.insightly.com/*',
template: 0,
confirm: true
Expand All @@ -41,6 +42,7 @@ const testConfig3 = {
npmName: 'my-app3',
description: 'ma-app3',
version: '0.0.1',
browser: 'chrome',
siteMatch: 'https://*.redtailtechnology.com/*',
template: 1,
confirm: true
Expand Down

0 comments on commit 6a83490

Please sign in to comment.