Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

InspringCon Lightning Talk - Frontend Form Vali...

InspringCon Lightning Talk - Frontend Form Validation

I present an idea how to automate frontend form validation in the Neos Flow PHP Framework by exposing the Validators defined on an entity to the frontend.

Bastian Heist

April 23, 2016
Tweet

More Decks by Bastian Heist

Other Decks in Programming

Transcript

  1. Browser Flow Form <f:form object=“{entity}” …> <f:form.textfield property=“email” … />

    </f:form> 
 /**
 * @Flow\Entity
 */
 class User
 {
 /**
 * @var string
 * @Flow\Validate(type="NotEmpty")
 * @Flow\Validate(type="EmailAddress")
 */
 protected $email; … } <script>autogenerated JS to
 validate a form field</script> Validation Endpoint