diff --git a/client/components/combobox.jsx b/client/components/combobox.jsx index c89ccb908..230d079db 100644 --- a/client/components/combobox.jsx +++ b/client/components/combobox.jsx @@ -14,7 +14,7 @@ const Combobox = ({ suggestMethod : 'includes', filterOn : [] // should allow as array to filter on multiple attributes, or even custom filter }, - valuePatterns = /.+/, + valuePatterns = '.+', options = [], keepValueOnClose = false, ...props diff --git a/client/homebrew/editor/metadataEditor/metadataEditor.jsx b/client/homebrew/editor/metadataEditor/metadataEditor.jsx index 54332b468..feb1cf2b1 100644 --- a/client/homebrew/editor/metadataEditor/metadataEditor.jsx +++ b/client/homebrew/editor/metadataEditor/metadataEditor.jsx @@ -264,6 +264,7 @@ const MetadataEditor = ({ defaultValue={metadata.lang || ''} keepValueOnClose={true} placeholder='en' + valuePatterns="^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$" onSelect={(value)=>handleLanguage(value)} onEntry={(e)=>{ e.target.setCustomValidity(''); //Clear the validation popup while typing