O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The form interface

An isomorphic web form implements the Form interface found in the isokit package:

type Form interface { Validate() bool Fields() map[string]string Errors() map[string]string FormParams() *FormParams PrefillFields() SetFields(fields map[string]string) SetErrors(errors map[string]string) SetFormParams(formParams *FormParams) SetPrefillFields(prefillFields []string)}

The Validate method determines if the form has been filled out properly or not, returning a Boolean value of true if the form has been filled out properly, and it returns a Boolean value of false if the form hasn't been filled out properly.

The Fields method returns map of all the form fields where the key is the name of the form field, and the value is the string ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required