We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48a412c commit 231b11dCopy full SHA for 231b11d
apps/frontend/src/components/launches/helpers/use.values.ts
@@ -1,8 +1,12 @@
1
import { useEffect, useMemo } from 'react';
2
import { useForm, useFormContext } from 'react-hook-form';
3
import { classValidatorResolver } from '@hookform/resolvers/class-validator';
4
+import { IsOptional } from 'class-validator';
5
-class Empty {}
6
+class Empty {
7
+ @IsOptional()
8
+ empty: string;
9
+}
10
11
const finalInformation = {} as {
12
[key: string]: {
@@ -53,6 +57,7 @@ export const useValues = (
53
57
criteriaMode: 'all',
54
58
});
55
59
60
+ console.log(form.formState.errors);
56
61
const getValues = useMemo(() => {
62
return () => ({
63
...form.getValues(),
0 commit comments