@@ -21,11 +21,27 @@ const FORM_STATES = {
21
21
} ;
22
22
23
23
const validationSchema = yup . object ( ) . shape ( {
24
+ firstName : yup
25
+ . string ( )
26
+ . trim ( )
27
+ . required ( 'Name is a required field' ) ,
24
28
email : yup
25
29
. string ( )
26
30
. trim ( )
27
31
. email ( 'Please provide a valid email' )
28
32
. required ( 'Email is a required field' ) ,
33
+ ciliumSlackUsername : yup
34
+ . string ( )
35
+ . trim ( )
36
+ . required ( 'Cilium Slack Username is a required field' ) ,
37
+ howAreYouUsingCilium : yup
38
+ . string ( )
39
+ . trim ( )
40
+ . required ( 'It is a required field' ) ,
41
+ message : yup
42
+ . string ( )
43
+ . trim ( )
44
+ . required ( 'Message is a required field' ) ,
29
45
} ) ;
30
46
31
47
const Form = ( { formClassName } ) => {
@@ -81,6 +97,7 @@ const Form = ({ formClassName }) => {
81
97
type = "text"
82
98
id = "firstName"
83
99
name = "name"
100
+ error = { errors ?. firstName ?. message }
84
101
autoComplete = "given-name"
85
102
{ ...register ( 'firstName' ) }
86
103
/>
@@ -100,13 +117,15 @@ const Form = ({ formClassName }) => {
100
117
type = "text"
101
118
id = "ciliumSlackUsername"
102
119
name = "ciliumSlackUsername"
120
+ error = { errors ?. ciliumSlackUsername ?. message }
103
121
{ ...register ( 'ciliumSlackUsername' ) }
104
122
/>
105
123
< Field
106
124
fieldName = "How are you using Cilium?"
107
125
type = "text"
108
126
id = "howAreYouUsingCilium"
109
127
name = "howAreYouUsingCilium"
128
+ error = { errors ?. howAreYouUsingCilium ?. message }
110
129
{ ...register ( 'howAreYouUsingCilium' ) }
111
130
/>
112
131
</ div >
@@ -116,10 +135,13 @@ const Form = ({ formClassName }) => {
116
135
fieldName = "Message"
117
136
id = "message"
118
137
name = "message"
138
+ error = { errors ?. message ?. message }
119
139
{ ...register ( 'message' ) }
120
140
/>
121
- < div className = "border-b border-gray-4 pb-4" >
122
- < span className = "text-sm font-semibold" > What do you need help with?</ span >
141
+ < div className = "border-b border-gray-4 dark:border-gray-7 pb-4" >
142
+ < span className = "text-sm font-semibold text-black dark:text-white" >
143
+ What do you need help with?
144
+ </ span >
123
145
< div className = "mt-5 grid gap-x-8 gap-y-4 md:grid-cols-[repeat(2,minmax(45%,max-content))]" >
124
146
< Checkbox
125
147
id = "reviewAbstract"
0 commit comments