mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: remove unused variable
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
export let value = '';
|
||||
|
||||
let element: HTMLInputElement;
|
||||
let error: string;
|
||||
let icon = 'info';
|
||||
const pattern = String.raw`/^[^._-][a-zA-Z0-9._-]*$/`;
|
||||
const autofocus = true;
|
||||
@@ -19,21 +18,13 @@
|
||||
const handleInvalid = (event: Event) => {
|
||||
event.preventDefault();
|
||||
|
||||
if (element.validity.valueMissing) {
|
||||
error = 'This field is required';
|
||||
return;
|
||||
}
|
||||
|
||||
if (element.validity.patternMismatch) {
|
||||
icon = 'exclamation';
|
||||
return;
|
||||
}
|
||||
|
||||
error = element.validationMessage;
|
||||
};
|
||||
|
||||
$: if (value) {
|
||||
error = null;
|
||||
icon = 'info';
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user