User story 2: validation fn