Add validate_cmd function
Merge branch 'raphink-validate_cmd'

* raphink-validate_cmd:
  Add validate_cmd function

This merge commit closes #113