mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-12 13:24:52 +00:00
add name check at front end by js
This commit is contained in:
@@ -31,6 +31,10 @@ define([
|
||||
validate: function(attrs, options) {
|
||||
if (!attrs.name) return gettext("Name is required");
|
||||
|
||||
if (attrs.name.indexOf('/') != -1) {
|
||||
return gettext("Name should not include '/'.");
|
||||
}
|
||||
|
||||
if (attrs.encrypted) {
|
||||
if (!attrs.passwd1) return gettext("Please enter password");
|
||||
if (!attrs.passwd2) return gettext("Please enter the password again");
|
||||
|
Reference in New Issue
Block a user