Skip to content

⚙️ [Implementation]: Validations #9

@Nima-MM

Description

@Nima-MM

⚙️ Technical Task

This issue focuses on technical aspects and code implementations in StockEase.


1️⃣ Description / Context

What needs to be implemented?

  • Login Form (email/password format, required fields)
    • no empty strings->trim()!==''
  • CRUD Operations on Inventory Entities (e.g., item name required, stock count ≥ 0)
    • no empty strings->trim()!==''
    • no negative numbers
  • Other user input forms (e.g., registration, profile edit)
    • no empty strings->trim()!==''
**Why is this important?** It ensures fluid UX by determining user caused error/defect
2️⃣ Implementation Steps (Checklist)
  • Architecture

    • Decide on validation approach: PrimeVue forms or Vuelidate.
    • Integrate with existing Vue.js Composition API structure.
    • Ensure forms are wrapped in a single state-management pattern (Pinia).
  • Data Flow

    • Validate user inputs on the client (frontend) before sending requests to the backend.
    • Return descriptive error messages from the backend (Java/Spring) where needed.
    • Keep validations in sync with backend constraints (e.g., @NotNull, @Email in Spring).
  • Testing & QA

    • Write unit tests for each form (e.g., test required fields, format checks).
    • Conduct integration tests ensuring correct error messages if validation fails.
    • Perform a code review to confirm consistent validation across all forms.
3️⃣ Timeline / Resources

Estimated Time:

  • < 1 day
  • 1–3 days
  • > 3 days

Required Resources (tools, libraries, personnel):

- PrimeVue components or Vuelidate library - Vue Composition API knowledge - Updated Spring Boot constraints ---

💡 Additional Notes

  • server-side validation in Spring Boot for sensitive operations
  • document final validation rules in /docs/validation-rules.md
    Thank you for contributing to StockEase!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions