WIP
fix for error states
remove debug from test
remove debug
tidying up
Merge pull request #200 from ministryofjustice/70458398/js-state-and-validation

70458398/js state and validation