Replace _constraint by validate method #3263

Review ID: 1093001
Merge pull request #114 from prakashpp/feature/task-3263

Replace _constraint by validate method #3263