Implemented constraint configuration
Added ability to choose the type of serialization for fields
Refactored serialization and custom constraints
Merge branch 'pr/2'