2016-03-09 39 views
0

,請參閱本網站 Here。所有驗證應罰款execpt合作是照片上傳,沒有選擇我想顯示錯誤消息的所有領域..​​.引導文件上傳驗證我使用的引導文件上傳不工作

<!--Firstname code--> 
    <div class="form-group"> 
     <label class="col-md-3 control-label">First Name<span class="star_mark">&nbsp;*</span></label> 
       <div class="col-sm-6"> 
        <input type="text" class="form-control" id="fname" name="fname" value="" aria-required="true" required="" data-msg-required="Please enter your firstname"> 

        </div> 
       </div> 
    <!-- File uplod code here --> 


<div class="form-group"> 
         <label class="col-md-3 control-label">Photo Upload</label> 
         <div class="col-md-6"> 
         <div class="fileupload fileupload-new" data-provides="fileupload"> 
         <div class="input-append"> 
         <div class="uneditable-input"> 
         <i class="fa fa-file fileupload-exists"></i> 
         <span class="fileupload-preview"></span> 
         </div> 
         <span class="btn btn-default btn-file"> 
         <span class="fileupload-exists">Change</span> 
         <span class="fileupload-new">Select file</span> 
         <input type="file" id="photo" name="photo" value="" aria-required="true" required="" data-msg-required="Please select any photo"> 
         </span> 
         <a href="#" class="btn btn-default fileupload-exists" data-dismiss="fileupload">Remove</a> 
         </div> 
         </div> 
         </div> 
         </div> 

回答

0

只需保留原樣。

<input type="file" id="photo" name="photo" value="" aria-required="true" required data-msg-required="Please select any photo"> 

或者你也可以嘗試像

<input type="file" id="photo" name="photo" value="" aria-required="true" required="required" data-msg-required="Please select any photo"> 

兩個選項都應該工作

+0

錯誤的messge它正在添加,但我想顯示在這裏下一行的錯誤信息會加油同一條線...... –