Skip to content

Commit

Permalink
Removed numbers and spaces in firstName and lastName input
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadfadhli committed Nov 1, 2024
1 parent 0a70b80 commit bdc5f8f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/iQMA-Skills-Builder/app/EditProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ export default function EditProfile() {
: null,
]}
value={firstName}
onChangeText={(text) => setFirstName(text)}
onChangeText={(text) => setFirstName(text.replace(/[0-9\s]/g, ''))}
maxLength={10}
/>
{firstName == '' ? <Text style={styles.errorLabel}>{firstNameError}</Text> : null}
<Text style={styles.label}>LAST NAME</Text>
Expand All @@ -111,7 +112,8 @@ export default function EditProfile() {
: null,
]}
value={lastName}
onChangeText={(text) => setLastName(text)}
onChangeText={(text) => setLastName(text.replace(/[0-9\s]/g, ''))}
maxLength={10}
/>
{lastName == '' ? <Text style={styles.errorLabel}>{lastNameError}</Text> : null}
<Text style={styles.label}>EMAIL</Text>
Expand Down

0 comments on commit bdc5f8f

Please sign in to comment.