Merge pull request #108 from sgmap/pb-int-validator

Correction du validateur d'entiers (question de la durée de contrat)
pull/119/head
Mael 2017-10-19 14:20:13 +02:00 committed by GitHub
commit 3665713b32
3 changed files with 5 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import {EXPLAIN_VARIABLE} from '../actions'
import References from './rule/References'
import './Aide.css'
import {capitalise0} from '../utils'
@connect(
state =>
@ -39,7 +40,7 @@ export default class Aide extends Component {
className="fa fa-times-circle"
onClick={stopExplaining} ></i>
<p
dangerouslySetInnerHTML={{__html: this.renderExplanationMarkdown(text, rule.titre)}}>
dangerouslySetInnerHTML={{__html: this.renderExplanationMarkdown(text, rule.titre || capitalise0(rule.name))}}>
</p>
{/* { possibilities &&
<p>

View File

@ -9,6 +9,6 @@ export let number = {
}
export let int = {
test: v => /^[0-9]+/.test(v),
test: v => /^[0-9]+$/.test(v),
error: 'Vous devez entrer un entier, par ex. 16'
}

View File

@ -45,7 +45,8 @@ export let reduceSteps = (tracker, flatRules, answerSource) => (state, action) =
...state,
analysedSituation,
situationGate: situationGate,
extraSteps: []
extraSteps: [],
explainedVariable: null
}
if (action.type == START_CONVERSATION) {