Open plocket opened 1 month ago
The solution to this problem is to use Zod validation, as shown in the link below. We already have the validation in place, we just need to adjust it, which is why we're seeing conflicts.
Posted comment by @thiagobardini in https://github.com/codeforboston/home-energy-analysis-tool/pull/255#discussion_r1783748637
From https://github.com/codeforboston/home-energy-analysis-tool/pull/255#discussion_r1792622597
Briefly talked about tradeoffs of using optional in meeting, esp mentioning required form fields being driven by Zod. To me that means if we take the .optional() approach, we may need multiple zod objects for the same piece. Let's cover this in #258
From now, let's keep this convo in here
?.
optional chaining operator fromuser_data
?.
optional chaining operators in general? They indicate that something is not as expected, which will have consequences somewhere in the code. Those cases should be handled._Originally posted by @plocket in https://github.com/codeforboston/home-energy-analysis-tool/pull/255#discussion_r1783658329_