mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Relax validation of git urls
This commit is contained in:
@@ -1288,7 +1288,8 @@ RED.projects.settings = (function() {
|
||||
|
||||
var validateForm = function() {
|
||||
var validName = /^[a-zA-Z0-9\-_]+$/.test(remoteNameInput.val());
|
||||
var validRepo = /^(?:file|git|ssh|https?|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?[\w\.@:\/~_-]+(?:\.git)?(?:\/?|\#[\d\w\.\-_]+?)$/.test(remoteURLInput.val());
|
||||
// var validRepo = /^(?:file|git|ssh|https?|[\d\w\.\-_]+@[\w\.]+):(?:\/\/)?[\w\.@:\/~_-]+(?:\.git)?(?:\/?|\#[\d\w\.\-_]+?)$/.test(remoteURLInput.val());
|
||||
var validRepo = !/\s/.test(remoteURLInput.val());
|
||||
saveButton.attr('disabled',(!validName || !validRepo))
|
||||
remoteNameInput.toggleClass('input-error',remoteNameInputChanged&&!validName);
|
||||
if (popover) {
|
||||
|
Reference in New Issue
Block a user