Skip to content

Commit

Permalink
chore: add allowedFileFormat properties for signature fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Nil20 committed Sep 11, 2024
1 parent c9fe358 commit 00b3c28
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/form/common/common-optional-fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ export const informantsSignature = {
},
validator: [],
type: 'SIGNATURE',
allowedFileFormats: ['image/png', 'image/svg'],
mapping: {
mutation: {
operation: 'fieldValueSectionExchangeTransformer',
Expand Down
4 changes: 4 additions & 0 deletions src/form/marriage/required-sections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const signatureFields = [
required: true,
validator: [],
type: 'SIGNATURE',
allowedFileFormats: ['image/png'],
mapping: {
mutation: {
operation: 'fieldValueSectionExchangeTransformer',
Expand All @@ -144,6 +145,7 @@ const signatureFields = [
required: true,
validator: [],
type: 'SIGNATURE',
allowedFileFormats: ['image/png'],
mapping: {
mutation: {
operation: 'fieldValueSectionExchangeTransformer',
Expand All @@ -165,6 +167,7 @@ const signatureFields = [
required: true,
validator: [],
type: 'SIGNATURE',
allowedFileFormats: ['image/png'],
mapping: {
mutation: {
operation: 'fieldValueSectionExchangeTransformer',
Expand All @@ -186,6 +189,7 @@ const signatureFields = [
required: true,
validator: [],
type: 'SIGNATURE',
allowedFileFormats: ['image/png'],
mapping: {
mutation: {
operation: 'fieldValueSectionExchangeTransformer',
Expand Down
7 changes: 6 additions & 1 deletion src/form/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,12 @@ export interface IHeading3Field extends IFormFieldBase {
export interface ISignatureFormField extends IFormFieldBase {
type: typeof SIGNATURE
maxSizeMb?: number
allowedFileFormats?: ('png' | 'jpg' | 'jpeg' | 'svg')[]
allowedFileFormats?: (
| 'image/png'
| 'image/jpg'
| 'image/jpeg'
| 'image/svg'
)[]
}

export type IFormField =
Expand Down

0 comments on commit 00b3c28

Please sign in to comment.