added extra validators for the collection int64 field options
This commit is contained in:
@@ -16,8 +16,9 @@
|
||||
id={uniqueId}
|
||||
step="1"
|
||||
min="0"
|
||||
max={Number.MAX_SAFE_INTEGER}
|
||||
value={field.maxSize || ""}
|
||||
on:input={(e) => (field.maxSize = e.target.value << 0)}
|
||||
on:input={(e) => (field.maxSize = parseInt(e.target.value, 10))}
|
||||
placeholder="Default to max ~5MB"
|
||||
/>
|
||||
</Field>
|
||||
|
||||
@@ -249,8 +249,9 @@
|
||||
id={uniqueId}
|
||||
step="1"
|
||||
min="0"
|
||||
max={Number.MAX_SAFE_INTEGER}
|
||||
value={field.maxSize || ""}
|
||||
on:input={(e) => (field.maxSize = e.target.value << 0)}
|
||||
on:input={(e) => (field.maxSize = parseInt(e.target.value, 10))}
|
||||
placeholder="Default to max ~5MB"
|
||||
/>
|
||||
<div class="help-block">Must be in bytes.</div>
|
||||
@@ -266,6 +267,7 @@
|
||||
type="number"
|
||||
step="1"
|
||||
min="2"
|
||||
max={Number.MAX_SAFE_INTEGER}
|
||||
required
|
||||
placeholder="Default to single"
|
||||
bind:value={field.maxSelect}
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
id={uniqueId}
|
||||
step="1"
|
||||
min="0"
|
||||
max={Number.MAX_SAFE_INTEGER}
|
||||
value={field.maxSize || ""}
|
||||
on:input={(e) => (field.maxSize = e.target.value << 0)}
|
||||
on:input={(e) => (field.maxSize = parseInt(e.target.value, 10))}
|
||||
placeholder="Default to max ~5MB"
|
||||
/>
|
||||
</Field>
|
||||
|
||||
@@ -24,9 +24,10 @@
|
||||
id={uniqueId}
|
||||
step="1"
|
||||
min="0"
|
||||
max={Number.MAX_SAFE_INTEGER}
|
||||
placeholder="No min limit"
|
||||
value={field.min || ""}
|
||||
on:input={(e) => (field.min = e.target.value << 0)}
|
||||
on:input={(e) => (field.min = parseInt(e.target.value, 10))}
|
||||
/>
|
||||
</Field>
|
||||
</div>
|
||||
@@ -46,8 +47,9 @@
|
||||
step="1"
|
||||
placeholder="Default to max 5000 characters"
|
||||
min={field.min || 0}
|
||||
max={Number.MAX_SAFE_INTEGER}
|
||||
value={field.max || ""}
|
||||
on:input={(e) => (field.max = e.target.value << 0)}
|
||||
on:input={(e) => (field.max = parseInt(e.target.value, 10))}
|
||||
/>
|
||||
</Field>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user