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