Skip to content

Commit

Permalink
Merge pull request Expensify#23095 from samh-nl/fix/issue-22201
Browse files Browse the repository at this point in the history
fix: added maxLength to login and contact inputs
  • Loading branch information
MonilBhavsar authored Jul 19, 2023
2 parents ee2d4fd + 31a42de commit e19a620
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,7 @@ const CONST = {

FORM_CHARACTER_LIMIT: 50,
LEGAL_NAMES_CHARACTER_LIMIT: 150,
LOGIN_CHARACTER_LIMIT: 254,
WORKSPACE_NAME_CHARACTER_LIMIT: 80,
AVATAR_CROP_MODAL: {
// The next two constants control what is min and max value of the image crop scale.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ function NewContactMethodPage(props) {
inputID="phoneOrEmail"
autoCapitalize="none"
returnKeyType={Permissions.canUsePasswordlessLogins(props.betas) ? 'done' : 'next'}
maxLength={CONST.LOGIN_CHARACTER_LIMIT}
/>
</View>
{!Permissions.canUsePasswordlessLogins(props.betas) && (
Expand Down
1 change: 1 addition & 0 deletions src/pages/signin/LoginForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ function LoginForm(props) {
keyboardType={CONST.KEYBOARD_TYPE.EMAIL_ADDRESS}
errorText={formErrorText}
hasError={hasError}
maxLength={CONST.LOGIN_CHARACTER_LIMIT}
/>
</View>
{!_.isEmpty(props.account.success) && <Text style={[styles.formSuccess]}>{props.account.success}</Text>}
Expand Down

0 comments on commit e19a620

Please sign in to comment.