incoming icon indicating copy to clipboard operation
incoming copied to clipboard

validation constraints on datatypes

Open vaidik opened this issue 11 years ago • 2 comments

string:

  • regex
  • min/max length

array:

  • min/max length

vaidik avatar May 08 '13 11:05 vaidik

I think we can easily implement this, but I would suggest that we: Rename datatypes -> fields: data types is too specific to value types, if we rename it to fields we can use current fields as IntegerField, StringField, etc. and also introduce new fields like RegexField, EnumField, RangeField, etc.

dhruvbaldawa avatar Oct 19 '13 16:10 dhruvbaldawa

Yeah its just a matter of time. I didn't do it initially because I got busy with something else so just wanted to release something.

The thought about using datatypes/types as a name originated from the fact that initially I just wanted to map it to the valid types in JSON. However, later I did realize that this won't scale and will make the API sound not correct. I had a similar plan of being able to allow such fields. So yeah, I'd say that 's the way forward.

vaidik avatar Oct 20 '13 03:10 vaidik