PrestaShop / PrestaShop/docs

CQRS validation

Open
#905 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Scala
Stars
136
Forks
555
Avg merge
4d 14h
Merged PRs (30d)
4

Description

I have question about your approach to validation.
I've discovered validation rules in: forms, commands before dispatch, command handlers and entities (eg. when add product to cart). This includes a lot of repetition.

Can anyone describe how validation should be performed?

  • Where validate data rules (like max length, correct syntax)?
  • Where validate business rules?
  • How catching business exceptions and forwarding messages from them to symfony form supports async command handling?

I read about future plans to move all backend/frontend presentation to vue. How symfony forms will be connected with vue? Does creating symfony forms make sens with vue in mind? Shouldn't form validation will be performed in commands?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name any documentation file, test, or entry point. Start by reviewing the existing guidance on Symfony forms, commands, command handlers, entities, and asynchronous handling; done means documenting an agreed validation approach and explaining how form errors integrate with the frontend.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.