styled raw input: disable required props, use validate instead
This commit is contained in:
@@ -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