Thomas G. Lopes commited on
Commit
76beec4
·
1 Parent(s): b34bca6

reset field validation on close

Browse files
src/lib/components/inference-playground/custom-model-config.svelte CHANGED
@@ -45,6 +45,7 @@
45
  setTimeout(() => {
46
  dialog?.close();
47
  clear();
 
48
  }, 250);
49
  }
50
  });
 
45
  setTimeout(() => {
46
  dialog?.close();
47
  clear();
48
+ endpointValidation.reset();
49
  }, 250);
50
  }
51
  });
src/lib/utils/form.svelte.ts CHANGED
@@ -27,6 +27,10 @@ export function createFieldValidation(args: CreateFieldValidationArgs) {
27
  get msg() {
28
  return msg;
29
  },
 
 
 
 
30
  attrs: {
31
  onblur,
32
  oninput,
 
27
  get msg() {
28
  return msg;
29
  },
30
+ reset() {
31
+ valid = true;
32
+ msg = undefined;
33
+ },
34
  attrs: {
35
  onblur,
36
  oninput,