Skip to content

Commit 9b1ea35

Browse files
authored
Merge pull request #4354 from rdjuric/changeValidationDisplay
Changes to how validation displays in UI
2 parents 526aeb0 + 0f26898 commit 9b1ea35

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/CONST.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/libs/OptionsListUtils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,10 @@ function getHeaderMessage(hasSelectableOptions, hasUserToInvite, searchValue, ma
669669
return translate(preferredLocale, 'messages.maxParticipantsReached');
670670
}
671671

672+
if (searchValue && CONST.REGEX.DIGITS_AND_PLUS.test(searchValue) && !Str.isValidPhone(searchValue)) {
673+
return translate(preferredLocale, 'messages.noPhoneNumber');
674+
}
675+
672676
if (!hasSelectableOptions && !hasUserToInvite) {
673677
if (/^\d+$/.test(searchValue)) {
674678
return translate(preferredLocale, 'messages.noPhoneNumber');

0 commit comments

Comments
 (0)