created validation to get or post