validation
This commit is contained in:
@@ -82,6 +82,10 @@
|
||||
Developers will use this to reference the field
|
||||
</small>
|
||||
</label>
|
||||
<label>
|
||||
Help text
|
||||
<input bind:value={data.field.help} />
|
||||
</label>
|
||||
<label>
|
||||
<input
|
||||
bind:checked={data.field.translatable}
|
||||
@@ -90,6 +94,32 @@
|
||||
/>
|
||||
Is Translatable
|
||||
</label>
|
||||
<fieldset>
|
||||
<label>
|
||||
<input
|
||||
bind:checked={data.field.required}
|
||||
type="checkbox"
|
||||
role="switch"
|
||||
/>
|
||||
Required
|
||||
</label>
|
||||
<label>
|
||||
<input
|
||||
bind:checked={data.field.readonly}
|
||||
type="checkbox"
|
||||
role="switch"
|
||||
/>
|
||||
Readonly
|
||||
</label>
|
||||
<label>
|
||||
<input
|
||||
bind:checked={data.field.hidden}
|
||||
type="checkbox"
|
||||
role="switch"
|
||||
/>
|
||||
Hidden
|
||||
</label>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
{#if data.field.type === "text"}
|
||||
|
||||
@@ -2,41 +2,12 @@
|
||||
let { field } = $props();
|
||||
</script>
|
||||
|
||||
<fieldset>
|
||||
<label>
|
||||
<input
|
||||
bind:checked={field.props.required}
|
||||
type="checkbox"
|
||||
role="switch"
|
||||
/>
|
||||
Required
|
||||
</label>
|
||||
<label>
|
||||
<input
|
||||
bind:checked={field.props.readonly}
|
||||
type="checkbox"
|
||||
role="switch"
|
||||
/>
|
||||
Readonly
|
||||
</label>
|
||||
<label>
|
||||
<input
|
||||
bind:checked={field.props.hidden}
|
||||
type="checkbox"
|
||||
role="switch"
|
||||
/>
|
||||
Hidden
|
||||
</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label>
|
||||
Default
|
||||
<input bind:value={field.props.default} />
|
||||
</label>
|
||||
<label>
|
||||
Help text
|
||||
<input bind:value={field.props.help} />
|
||||
</label>
|
||||
|
||||
<label>
|
||||
Min characters
|
||||
<input type="number" bind:value={field.props.min} />
|
||||
|
||||
Reference in New Issue
Block a user