adding validation

Signed-off-by: Adrian Stainforth <adrians@spinnakerdirect.co.uk>