DEV Community

Discussion on: Clean Architecture on Frontend

Collapse
 
periva101 profile image
periva101

thank yoo ,
where the valation of the fields should go

Collapse
 
bespoyasov profile image
Alex Bespoyasov

Depends on the implementation. As for me, for the UI validation, I usually create a validation “service” that is used in the application layer.

Although, if we use canonical OOP we can place validation in the entities' constructors to avoid creating invalid entities in the first place.