mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Validate negative numbers in the posts per page setting
issue #1236 - added validation to not allow number less than 0
This commit is contained in:
parent
a7a4420128
commit
3edd0e118d
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue