feat: Improved country code in contact form view. (#6801)
* feat: Improved country code in contact. * chore: Minor fixes * chore: Minor fixes * chore: Adds arrow key navigation and cursor pointer * chore: Minor fix * chore: Code clean up * chore: Handle outside click --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>, Nithin David
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,8 @@
|
||||
export const isPhoneE164 = value => !!value.match(/^\+[1-9]\d{1,14}$/);
|
||||
export const isPhoneNumberValid = (value, dialCode) => {
|
||||
const number = value.replace(dialCode, '');
|
||||
return !!number.match(/^[0-9]{1,14}$/);
|
||||
};
|
||||
export const isPhoneE164OrEmpty = value => isPhoneE164(value) || value === '';
|
||||
export const shouldBeUrl = (value = '') =>
|
||||
value ? value.startsWith('http') : true;
|
||||
|
||||
Reference in New Issue
Block a user