Add validations to capsule app

The PR checks for validations wrt the subdomain and api token required fields. If the required fields are present it checks for their correctness.