Use A and z to validate user input, closes #194