validated otp input to be numbers
This commit is contained in:
@@ -23,6 +23,7 @@ export interface InputCompOneProps {
|
||||
parentSelectClass?: string;
|
||||
parentClass?: string;
|
||||
maxLength?: number;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
const InputCompOne = forwardRef<HTMLInputElement, InputCompOneProps>(
|
||||
@@ -49,6 +50,7 @@ const InputCompOne = forwardRef<HTMLInputElement, InputCompOneProps>(
|
||||
parentSelectClass,
|
||||
parentClass,
|
||||
maxLength,
|
||||
error,
|
||||
},
|
||||
forwardedRef
|
||||
) => {
|
||||
@@ -58,6 +60,7 @@ const InputCompOne = forwardRef<HTMLInputElement, InputCompOneProps>(
|
||||
<label htmlFor="" className={labelClass}>
|
||||
{label}
|
||||
{labelSpan && <span className={labelSpanClass}>{labelSpan}</span>}
|
||||
{error && <span className='text-[10px] text-red-500'>{error}</span>}
|
||||
</label>
|
||||
)}
|
||||
{input && (
|
||||
|
||||
Reference in New Issue
Block a user