-
Notifications
You must be signed in to change notification settings - Fork 10
feat:validate plugin manifest URL before save #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat:validate plugin manifest URL before save #37
Conversation
Dospalko
commented
Sep 30, 2025
- add client-side validation for the plugin manifest URL so only http/https URLs can be saved
- surface inline feedback by passing validation state from PluginForm → BasicInfoTab → FormInput and wiring el-form-item props
- disable both save actions and manifest refresh while the URL is invalid, ensuring we trim input and revalidate on submit/refresh
✅ Deploy Preview for qelos-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| try { | ||
| const url = new URL(rawValue); | ||
| if (!['http:', 'https:'].includes(url.protocol)) { | ||
| return t('Manifest URL must start with http:// or https://'); | ||
| } | ||
| } catch (error) { | ||
| return t('Manifest URL must be a valid URL'); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this validation can be replaced by adding type="url" on the form input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a new commit! :)
|
@Dospalko thanks for the PR! |
|
Hey, @davidmeirlevy can you give me feedback please? :) i would like to have a Merge for uni purposes:)) |
|
@Dospalko i already gave you a comment: this validation can be replaced by adding type="url" on the form input. |
|
Validation now relies on the native type="url" field and HTML5 checks instead of the old new URL try/catch block. |
|
@Dospalko looks good. I'll run it locally at the weekend and check this out. Thanks. |
|
@Dospalko can you please fix the conflicts with main branch? |
| manifestSubmitAttempted.value = true; | ||
| if (typeof edit.manifestUrl === 'string') { | ||
| edit.manifestUrl = edit.manifestUrl.trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a vue modifier for v-model:
https://vuejs.org/guide/essentials/forms#trim
…n-manifest-validation