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

InspringCon Lightning Talk - Frontend Form Vali...

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

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.

Avatar for Bastian Heist

Bastian Heist

April 23, 2016

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