Use old url validation
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
const React = require('react');
|
||||
const {Modal, Button, FormGroup, FormControl, ControlLabel, HelpBlock} = require('react-bootstrap');
|
||||
const validUrl = require('valid-url');
|
||||
|
||||
class NewTeamModal extends React.Component {
|
||||
constructor() {
|
||||
@@ -51,7 +50,7 @@ class NewTeamModal extends React.Component {
|
||||
if (this.state.teamUrl.length === 0) {
|
||||
return 'URL is required.';
|
||||
}
|
||||
if (!validUrl.isUri(this.state.teamUrl)) {
|
||||
if (!(/^https?:\/\/.*/).test(this.state.teamUrl.trim())) {
|
||||
return 'URL should start with http:// or https://.';
|
||||
}
|
||||
return null;
|
||||
|
@@ -24,7 +24,6 @@
|
||||
"react-addons-css-transition-group": "^15.4.1",
|
||||
"react-bootstrap": "~0.30.7",
|
||||
"react-dom": "^15.4.1",
|
||||
"valid-url": "^1.0.9",
|
||||
"yargs": "^3.32.0"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user