Sha256: 88f494729dec030fe12094055fce10e71b1bfe1b33c2f534995928b454da0a44
Contents?: true
Size: 538 Bytes
Versions: 1
Compression:
Stored size: 538 Bytes
Contents
function validateSentence(sentence) { var content = sentence.getContent().split(" "); for(var i = 0; i<content.length;i++){ if(content[i].length >= 10){ addError("word [" + content[i] +"] is too long. length: " + content[i].length, sentence); } } } // optionally, you can implement validation logic for document, section /* function preValidateSentence(sentence) { } function preValidateSection(section) { } function validateDocument(document) { } function validateSection(section) { } */
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
redpen-0.2.0 | lib/redpen-distribution-1.7.0/js/validator.js.example |