0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Merge pull request #1236 from Tmeister/validate-negative-post-per-page

This commit is contained in:
Hannah Wolfe 2013-10-22 23:23:18 +01:00
commit ce2c7b5341

View file

@ -174,6 +174,10 @@
Ghost.Validate
.check(postsPerPage, {message: "Please use a number less than 1000", el: $('postsPerPage')})
.isInt().max(1000);
Ghost.Validate
.check(postsPerPage, {message: "Please use a number greater than 0", el: $('postsPerPage')})
.isInt().min(0);
if (Ghost.Validate._errors.length > 0) {
Ghost.Validate.handleErrors();