Selaa lähdekoodia

修改校验规则

懒得勤快 6 vuotta sitten
vanhempi
sitoutus
43ee87ca9e

+ 1 - 1
src/Masuit.MyBlogs.Core/Models/DTO/CommentInputDto.cs

@@ -20,7 +20,7 @@ namespace Masuit.MyBlogs.Core.Models.DTO
         /// <summary>
         /// 昵称
         /// </summary>
-        [Required(ErrorMessage = "既然要评论,不留名怎么行呢!"), MaxLength(24, ErrorMessage = "别闹,你这名字太长了吧!"), MinLength(2, ErrorMessage = "昵称至少2个字!")]
+        [Required(ErrorMessage = "既然要评论,不留名怎么行呢!"), MaxLength(36, ErrorMessage = "别闹,你这名字太长了吧!"), MinLength(2, ErrorMessage = "昵称至少2个字!")]
         public string NickName { get; set; }
 
         /// <summary>

+ 1 - 1
src/Masuit.MyBlogs.Core/Models/DTO/LeaveMessageInputDto.cs

@@ -22,7 +22,7 @@ namespace Masuit.MyBlogs.Core.Models.DTO
         /// <summary>
         /// 昵称
         /// </summary>
-        [Required(ErrorMessage = "昵称不能为空!"), MaxLength(24, ErrorMessage = "昵称最大支持24个字符"), MinLength(2, ErrorMessage = "昵称至少2个字")]
+        [Required(ErrorMessage = "昵称不能为空!"), MaxLength(36, ErrorMessage = "昵称最大支持36个字符"), MinLength(2, ErrorMessage = "昵称至少2个字")]
         public string NickName { get; set; }
 
         /// <summary>

+ 2 - 2
src/Masuit.MyBlogs.Core/Models/DTO/PostInputDto.cs

@@ -24,13 +24,13 @@ namespace Masuit.MyBlogs.Core.Models.DTO
         /// <summary>
         /// 标题
         /// </summary>
-        [Required(ErrorMessage = "文章标题不能为空!"), MaxLength(64, ErrorMessage = "文章标题最长支持64个字符!"), MinLength(4, ErrorMessage = "文章标题最少4个字符!")]
+        [Required(ErrorMessage = "文章标题不能为空!"), MaxLength(128, ErrorMessage = "文章标题最长支持128个字符!"), MinLength(4, ErrorMessage = "文章标题最少4个字符!")]
         public string Title { get; set; }
 
         /// <summary>
         /// 作者
         /// </summary>
-        [Required, MaxLength(24, ErrorMessage = "作者名最长支持24个字符!"), MinLength(2, ErrorMessage = "作者名最少2个字符!")]
+        [Required, MaxLength(36, ErrorMessage = "作者名最长支持36个字符!"), MinLength(2, ErrorMessage = "作者名最少2个字符!")]
         public string Author { get; set; }
 
         /// <summary>

+ 2 - 2
src/Masuit.MyBlogs.Core/wwwroot/Scripts/global/article.js

@@ -82,7 +82,7 @@
 	$("#comment").on("submit", function(e) {
 		e.preventDefault();
 		layui.layedit.sync(1);
-		if ($("#name").val().trim().length <= 1 || $("#name").val().trim().length > 30) {
+		if ($("#name").val().trim().length <= 1 || $("#name").val().trim().length > 36) {
 			window.notie.alert({
 				type: 3,
 				text: '再怎么你也应该留个合理的名字吧,非主流的我可不喜欢!',
@@ -139,7 +139,7 @@
 		e.preventDefault();
 		layui.layedit.sync(window.currentEditor);
 		loading();
-		if ($("#name2").val().trim().length <= 0 || $("#name").val().trim().length > 20) {
+		if ($("#name2").val().trim().length <= 0 || $("#name").val().trim().length > 36) {
 			window.notie.alert({
 				type: 3,
 				text: "亲,能留个正常点的名字不!",

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
src/Masuit.MyBlogs.Core/wwwroot/Scripts/global/article.min.js


+ 2 - 2
src/Masuit.MyBlogs.Core/wwwroot/Scripts/global/leavemsg.js

@@ -18,7 +18,7 @@
     $("#msg-form").on("submit", function(e) {
         e.preventDefault();
         layui.layedit.sync(1);
-        if ($("#name").val().trim().length <= 0 || $("#name").val().trim().length > 20) {
+        if ($("#name").val().trim().length <= 0 || $("#name").val().trim().length > 36) {
 	        window.notie.alert({
 		        type: 3,
 		        text: '再怎么你也应该留个合理的名字吧,非主流的我可不喜欢!',
@@ -84,7 +84,7 @@
     $("#reply-form").on("submit", function(e) {
         e.preventDefault();
         layui.layedit.sync(window.currentEditor);
-        if ($("#name2").val().trim().length <= 0 || $("#name").val().trim().length > 20) {
+        if ($("#name2").val().trim().length <= 0 || $("#name").val().trim().length > 36) {
 	        window.notie.alert({
 		        type: 3,
                 text: "亲,能留个正常点的名字不!",

+ 4 - 4
src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/post.js

@@ -414,10 +414,10 @@ myApp.controller("writeblog", ["$scope", "$http", "$timeout", function ($scope,
 		if (!post.Label) {
 			post.Label = null;
 		}
-		if (post.Title.trim().length <= 2 || post.Title.trim().length > 64) {
+		if (post.Title.trim().length <= 2 || post.Title.trim().length > 128) {
 			window.notie.alert({
 				type: 3,
-				text: '文章标题必须在2到64个字符以内!',
+				text: '文章标题必须在2到128个字符以内!',
 				time: 4
 			});
 			$scope.loadingDone();
@@ -597,10 +597,10 @@ myApp.controller("postedit", ["$scope", "$http", "$location", "$timeout", functi
 		if (!post.Label) {
 			post.Label = null;
 		}
-		if (post.Title.trim().length <= 2 || post.Title.trim().length > 64) {
+		if (post.Title.trim().length <= 2 || post.Title.trim().length > 128) {
 			window.notie.alert({
 				type: 3,
-				text: '文章标题必须在2到64个字符以内!',
+				text: '文章标题必须在2到128个字符以内!',
 				time: 4
 			});
 			$scope.loadingDone();

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä