Input validation now works