Implementing validation.