Add validation of code