fix: Url validator now allows empty value
This commit is contained in:
parent
b5961c52eb
commit
1023ae2fc1
@ -250,6 +250,10 @@ const rules: Record<string, ValidationRuleFn> = {
|
|||||||
* Rule: checks if a string is a valid url
|
* Rule: checks if a string is a valid url
|
||||||
*/
|
*/
|
||||||
url ({ value }: ValidationContext): boolean {
|
url ({ value }: ValidationContext): boolean {
|
||||||
|
if (!value) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
return isUrl(value)
|
return isUrl(value)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user