Added the validation for attribute