Introduce DSL to describe validations and ...

refactor length validation to start with.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>