formers / former

A powerful form builder, for Laravel and other frameworks (stand-alone too)
https://formers.github.io/former/
1.34k stars 204 forks source link

Fix errors when using rules in validation array #592

Closed stayallive closed 4 years ago

stayallive commented 4 years ago

This fixes errors when using rule objects.

We might want to see if we can support all the different rule objects and convert them to Former rules but that will be a thing for the future.

For now this prevents Former form crashing when a Rule object is introduced into the rules of an element.

Related: #580 (want to keep this open to track supporting rule objects)

stayallive commented 4 years ago

There was still 1 case left when a rule was passed as the only rule.

This was fixed here: cc2f3c4a54bc3e0b2c04a3576f97b60bd551a6fc