styled raw input: disable required props, use validate instead
This commit is contained in:
1 parent
52e9176d5a
commit
7a10f25aae
1 file changed
+2
-1
@@ -8,7 +8,7 @@
|
|||||||
import { generateIdentifier } from './util';
|
import { generateIdentifier } from './util';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
|
|
||||||
type $Props = Omit<HTMLInputAttributes, 'name' | 'value'> & {
|
type $Props = Omit<HTMLInputAttributes, 'name' | 'value' | 'required' | 'aria-required'> & {
|
||||||
name?: string;
|
name?: string;
|
||||||
value?: string;
|
value?: string;
|
||||||
validate?: ValidatorOptions;
|
validate?: ValidatorOptions;
|
||||||
@@ -62,6 +62,7 @@
|
|||||||
{name}
|
{name}
|
||||||
{placeholder}
|
{placeholder}
|
||||||
aria-label={placeholder}
|
aria-label={placeholder}
|
||||||
|
aria-required={validateOpts?.required}
|
||||||
{...others}
|
{...others}
|
||||||
bind:value
|
bind:value
|
||||||
class={[
|
class={[
|
||||||
|
|||||||
Reference in new issue
Block a user