1
0
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:
lian
2017-04-14 14:03:25 +08:00
parent fef1d50ecd
commit 534272ecd2
4 changed files with 35 additions and 0 deletions

View File

@@ -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");