Add custom attribute with validation using setup script

Custom attributes can be added through Magento Admin Panel > Catalog > Attributes > Manage Attributes , but you can also add attributes through the SQL setup file of your module. Example List of allowed parameters for attributes Extracted from Mage_Eav_Model_Entity_Setup::addAttribute: entity_type_id attribute_code backend_model backend_type backend_table frontend_model frontend_input frontend_input_renderer frontend_label frontend_class source_model is_global is_visible is_required…