2015-01-26 93 views
0

,所以我有一個簡單的形式:你能改變html通知語言嗎?

<form class="cmxform" id="commentForm" method="get" action="" style="padding:7px"> 
    <fieldset> 
    <legend>Please provide your name, email address (won't be published) and a comment</legend> 
    <p> 
     <label for="cccel">Cel</label><br /> 
     <input class="form-control" id="ccel" name="cel" minlength="10" maxlength="10" type="text" type="number" required> 
    </p> 
    <p> 
     <label for="ccelconf">Confirma tu Celular</label><br /> 
     <input class="form-control" id="ccelconf" name="cel" minlength="10" maxlength="10" type="text" name="celconf" type="number" required> 
    </p> 
    <p> 
     <label for="cocr">OCR</label><br /> 
     <input class="form-control" id="cocr" minlength="9" maxlength="13" type="text" name="ocr" type="number" required> 
    </p> 
    <p> 
     <label for="cocrconf">Confirma tu OCR </label><br /> 
     <input class="form-control" id="cocrconf" minlength="9" maxlength="13" name="ocrconf" type="number" required> 
    </p> 
    <p> 
     <input class="submit" type="submit" value="Submit"> 
    </p> 
    </fieldset> 
</form> 

,我的問題是,你可以改變的需要,最小長度通知的語言? 或者至少你可以編輯它們嗎?

如果可能,情況會如何。

回答

-1

好吧,它正在編輯jquery.validate.js腳本,對不起。

OK,進入文件,並在消息的部分只是改變你想要的:

messages: { 
     required: "Este Campo es requerido", 
     remote: "Please fix this field.", 
     email: "Please enter a valid email address.", 
     url: "Please enter a valid URL.", 
     date: "Please enter a valid date.", 
     dateISO: "Please enter a valid date (ISO).", 
     number: "Please enter a valid number.", 
     digits: "Please enter only digits.", 
     creditcard: "Please enter a valid credit card number.", 
     equalTo: "Please enter the same value again.", 
     maxlength: $.validator.format("Por favor no ingreses mas de {0} caracteres"), 
     minlength: $.validator.format("Por favor ingresa al menos {0} caracteres"), 
     rangelength: $.validator.format("Por favor ingresa un valor de entre {0} y {1} caracteres"), 
     range: $.validator.format("Please enter a value between {0} and {1}."), 
     max: $.validator.format("Please enter a value less than or equal to {0}."), 
     min: $.validator.format("Please enter a value greater than or equal to {0}.") 
    }, 
+0

不是答案。如果您錯誤地發佈了該問題,請刪除它。如果你有一個澄清(使它可能成爲一個明確的可回答的問題),請編輯該問題。除非你有答案,否則不要發佈答案。 – 2015-01-26 18:05:46