@ -17,14 +17,13 @@ Create a structure named `Form` that will have the following fields:
- `first_name`: `String`
- `last_name`: `String`
- `birth`: `NaiveDate` that will convert a string `"2015-09-05"` to a date of that format.
- `fav_colour`: of type `Color` that must be an `enum` with the fields `Red`, `Blue` and `Green`
- `birth_location`: `String`
- `password`: `String`
You must implement the **associated functions**`new` and
`validate` that will validate the form.
For the error type you must create a `struct` named `FErr`. It must have the fields:
For the error type you must create a `struct` named `FormError`. It must have the fields:
- `form_values`: this will be a tuple of strings representing the invalid input. For example: `("password", "asdaSD\_")` or `("first_name", "someone")`
@ -47,15 +46,11 @@ pub use chrono::{Utc, NaiveDate};
// this will be the structure that wil handle the errors