mirror of https://github.com/calzoneman/sync.git
Fix typos in channel.jade; fix username regex
This commit is contained in:
parent
c213dd1374
commit
5fe5dd440e
|
@ -32,13 +32,26 @@ Set.prototype.forEach = function (fn) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var USERNAME_REGEX = new RegExp(
|
||||||
|
"^[-\\w" + // Hyphen and a-zA-Z0-9_
|
||||||
|
"\\u00c0-\\u00c5" + // Uppercase A
|
||||||
|
"\\u00c7-\\u00cf" + // Uppercase C, E and I
|
||||||
|
"\\u00d1-\\u00d6" + // Uppercase N and O
|
||||||
|
"\\u00d9-\\u00dd" + // Uppercase U and Y
|
||||||
|
"\\u00e0-\\u00e5" + // Lowercase A
|
||||||
|
"\\u00e7-\\u00ef" + // Lowercase C, E anf I
|
||||||
|
"\\u00f1-\\u00f6" + // Lowercase N anf O
|
||||||
|
"\\u00f9-\\u00ff" + // Lowercase U anf Y
|
||||||
|
"]{1,20}$"
|
||||||
|
);
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isValidChannelName: function (name) {
|
isValidChannelName: function (name) {
|
||||||
return name.match(/^[\w-_]{1,30}$/);
|
return name.match(/^[\w-_]{1,30}$/);
|
||||||
},
|
},
|
||||||
|
|
||||||
isValidUserName: function (name) {
|
isValidUserName: function (name) {
|
||||||
return name.match(/^[-\w\u00c0-\u00ff]{1,20}$/);
|
return name.match(USERNAME_REGEX);
|
||||||
},
|
},
|
||||||
|
|
||||||
isValidEmail: function (email) {
|
isValidEmail: function (email) {
|
||||||
|
|
|
@ -43,7 +43,7 @@ html(lang="en")
|
||||||
span.input-group-addon Guest login
|
span.input-group-addon Guest login
|
||||||
input#guestname.form-control(type="text", placeholder="Name")
|
input#guestname.form-control(type="text", placeholder="Name")
|
||||||
#videowrap.col-lg-7.col-md-7
|
#videowrap.col-lg-7.col-md-7
|
||||||
p#currenttitle Nothing Playling
|
p#currenttitle Nothing Playing
|
||||||
#ytapiplayer
|
#ytapiplayer
|
||||||
#controlsrow.row
|
#controlsrow.row
|
||||||
#leftcontrols.col-lg-5.col-md-5
|
#leftcontrols.col-lg-5.col-md-5
|
||||||
|
@ -134,7 +134,7 @@ html(lang="en")
|
||||||
.modal-dialog
|
.modal-dialog
|
||||||
.modal-content
|
.modal-content
|
||||||
.modal-header
|
.modal-header
|
||||||
button.close(data-dismiss="modal", aria-hidden="true")×
|
button.close(data-dismiss="modal", aria-hidden="true") ×
|
||||||
h4 User Preferences
|
h4 User Preferences
|
||||||
ul.nav.nav-tabs
|
ul.nav.nav-tabs
|
||||||
li: a(href="#us-general", data-toggle="tab") General
|
li: a(href="#us-general", data-toggle="tab") General
|
||||||
|
@ -155,7 +155,7 @@ html(lang="en")
|
||||||
.modal-dialog
|
.modal-dialog
|
||||||
.modal-content
|
.modal-content
|
||||||
.modal-header
|
.modal-header
|
||||||
button.close(data-dismiss="modal", aria-hidden="true")×
|
button.close(data-dismiss="modal", aria-hidden="true") ×
|
||||||
h4 Channel Settings
|
h4 Channel Settings
|
||||||
ul.nav.nav-tabs
|
ul.nav.nav-tabs
|
||||||
li: a(href="#cs-miscoptions" data-toggle="tab") General Settings
|
li: a(href="#cs-miscoptions" data-toggle="tab") General Settings
|
||||||
|
|
Loading…
Reference in New Issue