shakacode / re-formality

Form validation tool for reason-react
https://re-formality.now.sh
MIT License
244 stars 35 forks source link

Drop value type #37

Closed alex35mil closed 5 years ago

alex35mil commented 5 years ago

After long and frustrating attempts to solve value problem using GADT and first-class modules I realized that all value types are already defined in state type and Formality doesn't really need particular value type to do its thing. Type data stored in state type is enough and all value management is in userland now. value escaped the abstraction. Phew.

Updated config module type:

module type Form = {
  type field;
  type state;
  type message;
  let validators: list(validator);
};