tcomb-form v0.8.0 Release Notes

  • Migration guide

    tcomb-form follows semver and technically this is a breaking change (hence the minor version bump). However, if you are using the default bootstrap templates, the default language (english) and you are not relying on the uvdom and uvdom-bootstrap modules, this is not a breaking change for you.

    How to

    0️⃣ I'm using the default bootstrap templates and the default language (english)

    This is easy: nothing changed for you.

    0️⃣ I'm using the default bootstrap templates but I override the language

    var t = require('tcomb-form/lib');
    -var templates = require('tcomb-form/lib/templates/bootstrap');
    +var templates = require('tcomb-form/node_modules/tcomb-form-templates-bootstrap');
    
    t.form.Form.templates = templates;
    t.form.Form.i18n = {
      ...
    };
    

    (contributions to src/i18n folder welcome!)

    0️⃣ I'm using the default language (english) but I override the templates

    npm install tcomb-form-templates-semantic --save
    
    var t = require('tcomb-form/lib');
    var i18n = require('tcomb-form/lib/i18n/en');
    -var templates = require('tcomb-form/lib/templates/semantic');
    +var templates = require('tcomb-form-templates-semantic');
    
    t.form.Form.i18n = i18n;
    t.form.Form.templates = templates;