validity function for public value