Comments (7)
The alternative to php is using yaml file that define the constraints - as per Symfony. I do see the technical advantage with your proxy class, I guess it is consistent approach using code generation, but validation can be very "fussy" and quite likely to be changed, Using yaml as the default lowers the barrier to get a site up "without php code". i.e. A whole site generated without code, including form validation! From your link above
Acme\BlogBundle\Entity\Author:
properties:
gender:
- Choice: { choices: [male, female], message: Choose a valid gender. }
from admingeneratorgeneratorbundle.
Yes i'm agree with the approch of yaml validators. thats why i've not already write code. I'm shared between extract automatically validations from model constraints (eg Unique column) -> so generate a php because can't do otherwise in cache. And lets devs write the validator yaml.
Do you know if a good men have do a generate validators command ? Could be a good alternative.
from admingeneratorgeneratorbundle.
+1 for yaml then. I believe that the first step is to clearly indicate to users how they can validate their model using existing validation constraints provided by symfony - without code change and of course coupled with html 5. i.e. Just extending the documentation as a start. This is why your generator approach is so powerful! When this recommended approach is written up this then it can be automated directly in the builders or commands. I think eventually the command approach fits better since this is decoupled from the builders and likely simpler. But can be deferred.
Put another way. In my opinion the generator should not in this early release do any more - you are generating symfony components which are very well documented, stable and extensible. Linking the generator to their documentation etc. Just a thought.
from admingeneratorgeneratorbundle.
OK so agree for all to move into roadmap 1.1 and method will be a command line to init the yaml into the folder of the bundle ?
from admingeneratorgeneratorbundle.
Sounds like a good plan.
from admingeneratorgeneratorbundle.
@cedriclombardot @CayetanoSoriano i think this is no longer neccessary as you can define validation constraints directly in the entity useing Annotations,
i think we should close this issue
from admingeneratorgeneratorbundle.
Yes and no for me validate an entity is not the same as validate a form. I can want to add differents constrainst depends if i'm in front or back for example
from admingeneratorgeneratorbundle.
Related Issues (20)
- afe_single_upload riquiered issue HOT 6
- Doctrine ORM Manager named "default" does not exist. HOT 8
- Hardcoded id in getFilterForm HOT 2
- Excel export. Wont Work HOT 3
- Extend ExcelController from the user project ListController HOT 8
- Problem after upgrade to Symfony 2.6 HOT 1
- Problem Multi upload with single upload HOT 4
- ContextErrorException HOT 3
- GenerateAdminCommand compatible with SensioGeneratorBundle HOT 2
- updateRouting definition error with symfony 2.6 HOT 4
- Conflict with avocode/form-extensions-bundle HOT 6
- ListController::isCsrfTokenValid() changed and need 2 arguments HOT 1
- Init new tag v1.0.3 and v1.1.4 HOT 4
- Add uglifyjs and uglifycss support HOT 3
- Filters HOT 1
- Cumplidos sus requerimientos, NO logro descargar via composer...please check ! I very interesting!
- ser
- Global stopOnFail(true) should be overrideable with local stopOnFail HOT 2
- updateRouting() should be compatible HOT 1
- ODM is no longer supported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from admingeneratorgeneratorbundle.