Add limit calculation and attribute form validation