Skip to content

Commit

Permalink
Fixed-Issue-PalisadoesFoundation#1285 Inconsistent character limit du…
Browse files Browse the repository at this point in the history
…ring organization creation for both name and description.
  • Loading branch information
gauravsingh94 committed Dec 29, 2023
1 parent 4506b74 commit c1f3ece
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions src/screens/OrgList/OrgList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,13 @@ function orgList(): JSX.Element {
required
value={formState.name}
onChange={(e): void => {
setFormState({
...formState,
name: e.target.value,
});
const inputText = e.target.value;
if (inputText.length < 50) {
setFormState({
...formState,
name: e.target.value,
});
}
}}
/>
<Form.Label htmlFor="descrip">{t('description')}</Form.Label>
Expand All @@ -478,10 +481,13 @@ function orgList(): JSX.Element {
required
value={formState.descrip}
onChange={(e): void => {
setFormState({
...formState,
descrip: e.target.value,
});
const descriptionText = e.target.value;
if (descriptionText.length < 100) {
setFormState({
...formState,
descrip: e.target.value,
});
}
}}
/>
<Form.Label htmlFor="location">{t('location')}</Form.Label>
Expand All @@ -494,10 +500,13 @@ function orgList(): JSX.Element {
required
value={formState.location}
onChange={(e): void => {
setFormState({
...formState,
location: e.target.value,
});
const locationText = e.target.value;
if (locationText.length < 100) {
setFormState({
...formState,
location: e.target.value,
});
}
}}
/>

Expand Down

0 comments on commit c1f3ece

Please sign in to comment.