added attr accessible, changed validate