Simplify radio CRUD code

This commit is contained in:
Deluan 2023-01-24 20:58:20 -05:00 • committed by Deluan Quintão
commit 5eefb265e5
6 changed files with 60 additions and 242 deletions

View file

@ -0,0 +1,12 @@
export const urlValidate = (value) => {
if (!value) {
return undefined
}
try {
new URL(value)
return undefined
} catch (_) {
return 'ra.validation.url'
}
}