tastyigniter / ti-ext-cart

A TastyIgniter extension that allows you to easily add a shopping cart to your site.
MIT License
8 stars 32 forks source link

Only use sometimes when rules are required #57

Closed ryanmitchell closed 3 years ago

ryanmitchell commented 3 years ago

Fixes: https://github.com/tastyigniter/TastyIgniter/issues/778

sampoyigi commented 3 years ago

Not sure if this works but using the nullable (not present) rule instead works and more cleaner... We could then add new component properties to make fields required or not.

ryanmitchell commented 3 years ago

I was working on the principle that if they were shown they are required?

On 5 Jun 2021, at 07:46, Sam Poyigi @.***> wrote:

Not sure if this works but using the nullable (not present) rule instead works and more cleaner... We could then add new component properties to make fields required or not.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tastyigniter/ti-ext-cart/pull/57#issuecomment-855194377, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMVOYMGKBR5WB4LC5TAL3TRHB3DANCNFSM46CV6FWA.

sampoyigi commented 3 years ago

Right, I mean we don't need the if check, simply replacing sometimes rule with nullable will cover cases where the fields are hidden.

ryanmitchell commented 3 years ago

No problem - updated.

On 8 Jun 2021, at 21:21, Sam Poyigi @.***> wrote:

Right, I mean we don't need the if check, simply replacing sometimes rule with nullable will cover cases where the fields are hidden.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tastyigniter/ti-ext-cart/pull/57#issuecomment-857097826, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMVO5BHGCGBPS7LH4OBQDTRZ3T7ANCNFSM46CV6FWA.