File tree Expand file tree Collapse file tree
packages/validation/src/Template Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,3 +82,20 @@ export const createQuestionTemplateRelationValidationSchema =
8282 sortOrder : Yup . number ( ) . required ( ) ,
8383 topicId : Yup . number ( ) . required ( ) ,
8484 } ) ;
85+
86+ export const createEmailTemplateValidationSchema = Yup . object ( ) . shape ( {
87+ name : Yup . string ( ) . required ( ) ,
88+ description : Yup . string ( ) . required ( ) ,
89+ useTemplateFile : Yup . bool ( ) . required ( ) ,
90+ subject : Yup . string ( ) . notRequired ( ) ,
91+ body : Yup . string ( ) . notRequired ( ) ,
92+ } ) ;
93+
94+ export const updateEmailTemplateValidationSchema = Yup . object ( ) . shape ( {
95+ id : Yup . number ( ) . required ( ) ,
96+ name : Yup . string ( ) . required ( ) ,
97+ description : Yup . string ( ) . required ( ) ,
98+ useTemplateFile : Yup . bool ( ) . required ( ) ,
99+ subject : Yup . string ( ) . notRequired ( ) ,
100+ body : Yup . string ( ) . notRequired ( ) ,
101+ } ) ;
You can’t perform that action at this time.
0 commit comments