Mohamed Hayibor
May 15th, 2016
Alchemist: https://mohamedhayibor.github.io
window.Parsley.addValidator('length', {
validateString: function(value) {
// if question's length less than 50, throw error
if (value.length < 50) {
return false
}
},
messages: {
en: "Your question is too short.",
fr: "Cette phrase est trop court."
}
});
window.Parsley.addValidator('question-mark', {
validateString: function(value) {
var tempString = value.trim();
if (tempString[tempString.length - 1] !== "?") {
return false;
}
},
messages: {
en: "Your question doesn't have a question mark at the end.",
fr: "Votre question n'a pas de point d'exclamation"
}
});
Github: https://github.com/mohamedhayibor
ejs: https://www.npmjs.com/package/ejs
visualization: https://plot.ly/javascript
semantic: http://semantic-ui.com