Missed data types
Closed this issue · 3 comments
I see that some data types are missed, or we should see how or where to join them:
- date
- select
- image
Best regards.
date -> string: use validators to ensure the string received is a date with a given format.
select -> mixed: depends on what the select values, there is no support for this yet.
image -> file: use validators to ensure the file received is an image
As you can see in de yii2 documentation (http://www.yiiframework.com/doc-2.0/guide-tutorial-core-validators.html), there are two differents core validators, one for file and the other for image, so
how can I use file validators to assure that it's an image, when there are two differents validators for one and the other?
About date, an input date is different for an input string talking about client systems, so for final users would be much easier to understand if that is divided rather than collapsed in the same data type.
If there is no support for select input, how can I achieve it in the form generator?
there are two differents core validators, one for file and the other for image
just use the image validator as the documentation states.
POST field/1/rules {class:image}
input date is different for an input string
Yes data type is for how the information is stored and presented, not about the input. Which I still don't know how to handle on the services. Which leads me to the next question
If there is no support for select input, how can I achieve it in the form generator?
I don't know, what you propose?