Explorar el Código

Use correct validation

sbkwgh hace 8 años
padre
commit
711963f3c0
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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) {