@@ -11,7 +11,7 @@ export type ContributionType = 'annotator' | 'share_data' | 'provide_models' | '
1111
1212export interface ContributeForm {
1313 contributionTypes : ContributionType [ ]
14- resourceLink : string
14+ resources : string
1515 additionalInfo : string
1616 name : string
1717 email : string
@@ -53,7 +53,7 @@ function validateMinLength(value: string, min: number): boolean {
5353function validateFormData ( form : ContributeForm ) : string | null {
5454 const name = form . name . trim ( )
5555 const email = form . email . trim ( )
56- const resourceLink = form . resourceLink . trim ( )
56+ const resources = form . resources . trim ( )
5757 const additionalInfo = form . additionalInfo . trim ( )
5858 const organization = form . organization . trim ( )
5959
@@ -66,8 +66,8 @@ function validateFormData(form: ContributeForm): string | null {
6666 if ( ! validateMaxLength ( email , 254 ) ) {
6767 return 'Email must not exceed 254 characters.'
6868 }
69- if ( resourceLink && ! validateMaxLength ( resourceLink , 1000 ) ) {
70- return 'Resource link must not exceed 1000 characters.'
69+ if ( resources && ! validateMaxLength ( resources , 5000 ) ) {
70+ return 'Resource link must not exceed 5000 characters.'
7171 }
7272 if ( additionalInfo && ! validateMaxLength ( additionalInfo , 5000 ) ) {
7373 return 'Additional info must not exceed 5000 characters.'
@@ -93,7 +93,7 @@ export default function useGlobalContribute() {
9393
9494 const contributeForm = ref < ContributeForm > ( {
9595 contributionTypes : [ ] ,
96- resourceLink : '' ,
96+ resources : '' ,
9797 additionalInfo : '' ,
9898 name : '' ,
9999 email : '' ,
@@ -128,7 +128,7 @@ export default function useGlobalContribute() {
128128 const resetContributeForm = ( ) => {
129129 contributeForm . value = {
130130 contributionTypes : [ ] ,
131- resourceLink : '' ,
131+ resources : '' ,
132132 additionalInfo : '' ,
133133 name : '' ,
134134 email : '' ,
@@ -156,8 +156,8 @@ export default function useGlobalContribute() {
156156 email : contributeForm . value . email ,
157157 }
158158
159- if ( contributeForm . value . resourceLink . trim ( ) ) {
160- payload . resource_link = contributeForm . value . resourceLink . trim ( )
159+ if ( contributeForm . value . resources . trim ( ) ) {
160+ payload . resources = contributeForm . value . resources . trim ( )
161161 }
162162 if ( contributeForm . value . additionalInfo . trim ( ) ) {
163163 payload . additional_info = contributeForm . value . additionalInfo . trim ( )
0 commit comments