2014-03-05 103 views
0

我是Bootstrap 3的新手。我正在創建一個登錄頁面,我有這樣的代碼:
*我從Bootply生成了這個。
Bootstrap表單驗證程序

<form class="form-horizontal"> 
<fieldset> 

<!-- Form Name --> 
<legend>Registry Login</legend> 

<!-- Text input--> 
<div class="form-group"> 
    <label class="col-md-4 control-label" for="input_email">Email</label> 
    <div class="col-md-8"> 
    <input id="input_username" name="input_email" placeholder="" class="form-control input-md" required="" type="email"> 

    </div> 
</div> 

<!-- Password input--> 
<div class="form-group"> 
    <label class="col-md-4 control-label" for="input_password">Password</label> 
    <div class="col-md-8"> 
    <input id="input_password" name="input_password" placeholder="" class="form-control input-md" required="" type="password"> 

    </div> 
</div> 


<!-- Button --> 
<div class="form-group"> 
    <label class="col-md-4 control-label" for=""></label> 
    <div class="col-md-4"> 
    <button id="" name="" class="btn btn-default">Login</button> 
    </div> 
</div> 

</fieldset> 
</form> 

我鍵入了我的電子郵件字段這個樣本串abcde和我收到一個小提示說Please enter an email address。有沒有辦法讓我改變文字?

+0

你在使用後端?如果你需要電子郵件格式的客戶端驗證,你將不得不通過jQuery來做到這一點。 –

+0

我在Bootstrap 3中使用CodeIgniter。我只注意到內建的驗證器會執行此操作,所以我想通過更改它返回的文本來最大化它。 –

回答

0

你必須改變Codeigniter的表單選項,我不太熟悉它,但它聽起來像是在提交文章的代碼下。