Skip to content

Commit

Permalink
feat(textarea): possibility to set maxLength
Browse files Browse the repository at this point in the history
  • Loading branch information
m0dh4x committed Dec 6, 2024
1 parent a7a780b commit 05d9a27
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 05d9a27

Please sign in to comment.