restrict works for attrs as well