add required attributes check