Fix bug non emptyable phones and urls
This commit is contained in:
@ -25,7 +25,7 @@ export const usePhoneField = () => {
|
|||||||
const persistField = usePersistField();
|
const persistField = usePersistField();
|
||||||
|
|
||||||
const persistPhoneField = (newPhoneValue: string) => {
|
const persistPhoneField = (newPhoneValue: string) => {
|
||||||
if (!isPossiblePhoneNumber(newPhoneValue)) return;
|
if (!isPossiblePhoneNumber(newPhoneValue) && newPhoneValue !== '') return;
|
||||||
|
|
||||||
persistField(newPhoneValue);
|
persistField(newPhoneValue);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -26,7 +26,7 @@ export const useURLField = () => {
|
|||||||
const persistField = usePersistField();
|
const persistField = usePersistField();
|
||||||
|
|
||||||
const persistURLField = (newValue: string) => {
|
const persistURLField = (newValue: string) => {
|
||||||
if (!isURL(newValue)) {
|
if (!isURL(newValue) && newValue !== '') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user