Upgrade to Pro — share decks privately, control downloads, hide ads and more …

InspringCon Lightning Talk - Frontend Form Validation

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

More Decks by Bastian Heist

Other Decks in Programming


  1. Form Validation!

  2. Here’s an idea…

  3. Expose the backend validators to automatically validate forms in the

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

 * @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
  5. // TODO

  6. Thank you! @beheist bastian.heist@sandstorm.de