Browse Source

Use correct validation

sbkwgh 8 năm trước cách đây
mục cha
commit
711963f3c0
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      models/thread.js

+ 2 - 2
models/thread.js

@@ -13,8 +13,8 @@ module.exports = (sequelize, DataTypes) => {
 				notEmpty: {
 					msg: 'The title cannot be empty'
 				},
-				max: {
-					args: '256',
+				len: {
+					args: [0, 256],
 					msg: 'The title can only be up to 256 characters'
 				},
 				isString (val) {