Skip to content

CraigChamberlain/fable-validation-example

Repository files navigation

Fable.Validation Example

Open in Gitpod

The Fable.Validation paket is used in this example to demonstrate a form validation and styling in an Elmish workflow.

In particular see the validateModel function in src/app.fs.

It is modelled after Zaid-Ajaj's elmish-login-flow-validation Which uses a previous version of Fable and other tools.

This project is built upon the Fulma Minimal Template

How to use ?

Architecture

  • Entry point of your application is src/App.fs
  • We are using hmtl-webpack-plugin to make src/index.html the entry point of the website
  • Entry point of your style is src/scss/main.scss
    • Bulma and Font Awesome are already included
    • We are supporting both scss and sass (by default we use scss)
  • Static assets (favicon, images, etc.) should be placed in the static folder

In development mode

If you are using Windows replace ./fake.sh by fake.cmd

  1. Run: ./fake.sh build -t Watch
  2. Go to http://localhost:8080/

On Unix you may need to run chmod a+x fake.sh

In development mode, we activate:

Build for production

If you are using Windows replace ./fake.sh by fake.cmd

  1. Run: ./fake.sh build
  2. All the files needed for deployment are under the output folder.