Add validation

Refs #56