Symfony. Validate an object based on its previous version

How to validate an object using the Validator component of Symfony and taking into account its previous version

Image for post
Image for post
Photo by Icons8 team on Unsplash
Image for post
Image for post
Image for post
Image for post

Defining a “Constraint class”

Image for post
Image for post

Defining a “Validator” class

Image for post
Image for post

¡Wow! Please, clarify UnitOfWork concept

Image for post
Image for post

Let’s continue with the TitleLengthValidator class

Associate the TitleLength constraint with the entity

Image for post
Image for post

¿Quieres recibir más artículos como este?

Entre paseo y paseo con Simba desarrollo en Symfony y React

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store