Skip to content

Commit

Permalink
Fixed-Issue-#1285 Inconsistent character limit during organization cr… (
Browse files Browse the repository at this point in the history
#1321)

* Fixed-Issue-#1285 Inconsistent character limit during organization creation for both name and description.

* Fixed-Issue-#1285 Inconsistent character limit during organization creation for both name and description.
  • Loading branch information
gauravsingh94 authored Dec 31, 2023
1 parent a6b1ca2 commit 32abab9
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 @@ -506,10 +506,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 @@ -522,10 +525,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 < 200) {
setFormState({
...formState,
descrip: e.target.value,
});
}
}}
/>
<Form.Label htmlFor="location">{t('location')}</Form.Label>
Expand All @@ -538,10 +544,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 32abab9

Please sign in to comment.