Skip to content

Commit

Permalink
Merge pull request #357 from digitalservicebund/feat/set-maxlength-fo…
Browse files Browse the repository at this point in the history
…r-textarea

allow set maxlength for textarea in strapi
  • Loading branch information
m0dh4x authored Dec 10, 2024
2 parents 399124b + 02109bd commit a8fe50e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/form-elements/textarea.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
"type": "component",
"repeatable": false,
"component": "page.details-summary"
},
"maxLength": {
"type": "integer",
"required": false,
"max": 5000,
"default": 5000
}
}
}
8 changes: 8 additions & 0 deletions types/generated/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@ export interface FormElementsTextarea extends Schema.Component {
'api::error.error'
>;
label: Attribute.String;
maxLength: Attribute.Integer &
Attribute.SetMinMax<
{
max: 5000;
},
number
> &
Attribute.DefaultTo<5000>;
name: Attribute.String & Attribute.Required;
placeholder: Attribute.String;
};
Expand Down

0 comments on commit a8fe50e

Please sign in to comment.