diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 36c8d8b..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: bug -assignees: '' ---- - -## Describe the bug - -A clear and concise description of what the bug is. - -## To Reproduce - -Steps to reproduce the behavior: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -## Expected behavior - -A clear and concise description of what you expected to happen. - -## Screenshots - -If applicable, add screenshots to help explain your problem. - -## Environment: - -- OS: [e.g., Windows, MacOS, Linux] -- Browser [e.g., Chrome, Safari] -- Version [e.g., 22] - -## Additional context - -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..33c920c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,110 @@ +name: Report a bug +description: Tell us about a bug or issue you may have identified in the form validation library. +title: "Provide a general summary of the issue" +labels: [bug] +body: + - type: checkboxes + attributes: + label: Prerequisites + description: Please take a couple minutes to help our maintainers work faster. + options: + - label: I have [searched](https://github.com/ltvco/form-validation/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) for duplicate or closed issues + required: true + - type: textarea + id: issue-description + attributes: + label: Describe the issue + description: Provide a summary of the issue. + placeholder: A clear and concise description of what the bug is. + validations: + required: true + - type: textarea + id: steps-to-reproduce + attributes: + label: Steps to Reproduce + description: Tell us how we can recreate the issue. + placeholder: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: What did you expect to happen? + placeholder: A clear and concise description of what you expected to happen. + validations: + required: true + - type: dropdown + id: operating-system + attributes: + label: What operating system(s) are you seeing the problem on? + multiple: true + options: + - Windows + - macOS + - Android + - iOS + - Linux + validations: + required: true + - type: dropdown + id: browser + attributes: + label: What browser(s) are you seeing the problem on? + multiple: true + options: + - Chrome + - Safari + - Firefox + - Microsoft Edge + - Opera + - Other + validations: + required: true + - type: input + id: other-browser + attributes: + label: Other browser(s) + description: If your browser isn't listed above, type it here. + placeholder: e.g. Brave, Vivaldi, etc. + - type: input + id: browser-version + attributes: + label: What version of the browser are you using? + placeholder: "e.g., Chrome 124.0.6367.91 or Safari 17.5" + validations: + required: true + - type: dropdown + id: platform + attributes: + label: Where does the bug occur? + description: Select the environment(s) where you noticed the issue. + multiple: true + options: + - Mobile + - Desktop + validations: + required: true + - type: textarea + id: form-setup + attributes: + label: Form setup and validation rules + description: Please provide details about your form setup, validation rules, and any relevant HTML/JavaScript code. + placeholder: | + Example: + ```html +
+ +
+ ``` + ```js + const validator = new FormValidator('#myForm', { + rules: { email: 'required|email' } + }); + ``` + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 45d0529..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: enhancement -assignees: '' ---- - -## Is your feature request related to a problem? Please describe. - -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -## Describe the solution you'd like - -A clear and concise description of what you want to happen. - -## Describe alternatives you've considered - -A clear and concise description of any alternative solutions or features you've considered. - -## Additional context - -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..159555d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,56 @@ +name: Feature request +description: Suggest new or updated features to include in the form validation library. +title: "Suggest a new feature" +labels: [enhancement] +body: + - type: checkboxes + attributes: + label: Prerequisites + description: Take a couple minutes to help our maintainers work faster. + options: + - label: I have [searched](https://github.com/ltvco/form-validation/issues?q=is%3Aissue%20state%3Aopen%20label%3Aenhancement) for duplicate or closed feature requests + required: true + - type: textarea + id: proposal + attributes: + label: Proposal + description: Provide detailed information for what we should add, including relevant links to prior art, screenshots, or live demos whenever possible. + validations: + required: true + - type: textarea + id: motivation + attributes: + label: Motivation and context + description: Tell us why this change is needed or helpful, and what problems it may help solve. + validations: + required: true + - type: textarea + id: solution + attributes: + label: Solution + description: Describe the solution you'd like to see implemented. + validations: + required: false + - type: textarea + id: alternatives + attributes: + label: Alternatives + description: Describe alternative solutions or features you've considered. + validations: + required: false + - type: textarea + id: use-cases + attributes: + label: Use cases + description: Describe specific scenarios where this feature would be beneficial. + placeholder: | + Example: + ```js + // Current workaround + validator.addRule('custom', function(value) { /* ... */ }); + + // Proposed feature + validator.validateAsync('email', value).then(/* ... */); + ``` + validations: + required: false diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index dd26246..816cd51 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,39 +1,26 @@ -# Description +## Description -[Provide a brief description of the changes introduced by this pull request. Explain the purpose and goals of the changes.] -[Please include a summary of the changes and the motivation behind them.] + -# Testing +## Type of Change -[Describe the steps you followed to test the changes made in this PR. Include details about the environment, configurations, and any test cases.] +- [ ] Bug fix (non-breaking change that fixes an issue) +- [ ] New feature (non-breaking change that adds functionality) +- [ ] Refactoring (non-breaking change with no user-facing impact) +- [ ] Breaking change (fix or feature that changes existing behavior) +- [ ] Documentation update +- [ ] Configuration (changes to build setup, tooling, or CI/CD) +- [ ] Chore (maintenance, code cleanup, or minor non-functional tasks) +- [ ] Test (adding or updating tests) -# Related Issue +## Related Issues -[If this PR addresses an open issue, link it here (e.g., #4).] + -## Type of Change / Changes Made +## Testing -- [List the key changes made in this PR. (e.g., below)] + -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) -- [ ] This change requires a documentation update +## Screenshots / Preview Link (if applicable) -## Checklist: - -- [ ] I have read the contributing guidelines -- [ ] My code follows the style guidelines of this project -- [ ] I have commented my code, particularly in hard-to-understand areas -- [ ] I have made corresponding changes to the documentation -- [ ] My changes do not introduce any new warnings -- [ ] I have added tests that prove my fix is effective or that my feature works -- [ ] New and existing unit tests pass locally with my changes - -# Screenshots (if applicable) - -[Add screenshots or GIFs to explain the visual changes in this PR.] - -# Additional Information - -[Provide any additional context or information about this PR.] + diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..659b257 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,9 @@ +# Reporting Security Issues + +The LTV Co. team takes security issues in our projects seriously. We appreciate your efforts to responsibly disclose any vulnerabilities, and we are committed to acknowledging your contributions and resolving issues promptly. + +If you discover a potential security issue in `@ltvco/form-validation`, please report it by emailing [security@ltvco.com](mailto:security@ltvco.com) and include the phrase **"Security Report – form-validation"** in the subject line. + +We will make every effort to respond quickly and keep you informed throughout the investigation and resolution process. + +Please do not report security vulnerabilities through GitHub issues or pull requests, as this could expose the issue publicly before it is resolved.