created validation method