mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 16:05:47 +01:00
🔀 Merge pull request #258 from ajnart/ajnart/issue256
🐛 Allow anything in the input for the form.
This commit is contained in:
@@ -123,13 +123,9 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
|
|||||||
validate: {
|
validate: {
|
||||||
apiKey: () => null,
|
apiKey: () => null,
|
||||||
// Validate icon with a regex
|
// Validate icon with a regex
|
||||||
icon: (value: string) => {
|
icon: (value: string) =>
|
||||||
// Regex to match everything that ends with and icon extension
|
// Disable matching to allow any values
|
||||||
if (!value.match(/\.(png|jpg|jpeg|gif|svg)$/)) {
|
null,
|
||||||
return 'Please enter a valid icon URL';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
// Validate url with a regex http/https
|
// Validate url with a regex http/https
|
||||||
url: (value: string) => {
|
url: (value: string) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user