Skip to content

Commit 76b835e

Browse files
committed
fix a bug with input number min
1 parent 31ab384 commit 76b835e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ and does not even need to listen on port 80 to do so.
7878
- Dates and timestamps returned from the database are now always formatted in ISO 8601 format, which is the standard format for dates in JSON. This makes it easier to use dates in SQLPage.
7979
- The `cookie` component now supports setting an explicit expiration date for cookies.
8080
- The `cookie` component now supports setting the `SameSite` attribute of cookies, and defaults to `SameSite=Strict` for all cookies. What this means in practice is that cookies set by SQLPage will not be sent to your website if the user is coming from another website. This prevents someone from tricking your users into executing SQLPage queries on your website by sending them a malicious link.
81+
- Bugfix: setting `min` or `max` to `0` in a number field in the `form` component now works as expected.
8182

8283
## 0.16.1 (2023-11-22)
8384

sqlpage/templates/form.handlebars

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
{{~#if type}} type="{{type}}" {{/if~}}
6969
{{~#if placeholder}} placeholder="{{placeholder}}" {{/if~}}
7070
{{~#if value}} value="{{value}}" {{/if~}}
71-
{{~#if max}} max="{{max}}" {{/if~}}
72-
{{~#if min}} min="{{min}}" {{/if~}}
71+
{{~#if (or max (eq max 0))}} max="{{max}}" {{/if~}}
72+
{{~#if (or min (eq min 0))}} min="{{min}}" {{/if~}}
7373
{{~#if step}} step="{{step}}" {{/if~}}
7474
{{~#if minlength}} minlength="{{minlength}}" {{/if~}}
7575
{{~#if maxlength}} maxlength="{{maxlength}}" {{/if~}}

0 commit comments

Comments
 (0)