aledejesus / item_catalog

Udacity Full Stack Web Developer Nanodegree Project 2: Item Catalog
0 stars 0 forks source link

Validate name duplicity and category existence in ItemForm #38

Open aledejesus opened 6 years ago

aledejesus commented 6 years ago

At the moment, these checks are made in the view. Check how to move this to the form. Maybe 2 more properties can be defined in the form: item_cls and category_cls. These will be passed from the view. Then, define a custom validation for name which checks that name does not exist and another one for the category which verifies that category exists.

aledejesus commented 6 years ago

Use this issue to change category_id to a SelectField and set choices to a function call that gets all categories