Added validate code
Merge remote-tracking branch 'upstream/validation' into validation