Replace _constraint by validate method #3263

Review ID: 1093001