-1
소수점으로 시작하는 숫자 절약 할 수 있으며, 해당 분야의 몇 달러 금액 걸릴 :나는 JSP 양식을 가지고
<tr id="amount" style="visibility: visible;"><td>
<numbered>1)  </numbered>Total Compensation: US$
<html:text maxlength="11" size="11" property="user.compensation" styleClass="required greaterThan0 compensation currency"/>
<span class="mandatory">!</span>
<br/><span class="errors"></span><br/>
</td></tr>
그것은 검증을 위해 jquery.validate.js를 사용을 ".123"(0.123)과 같은 숫자를 입력하고 저장하도록 요청되었습니다.
// http://docs.jquery.com/Plugins/Validation/Methods/number
number: function(value, element) {
return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);
},
하지만 어떻게 변경할 수는 소수점으로 시작하는 번호의 저장을 허용하는 님의 JS 포인트
기능?
도움을 주신 덕분에'\ d {1,3}'을'\ d {0,3}' – Halcyon
@ 할시 콘으로 변경해보십시오. 그래도 여전히 저장할 수 없습니다. – sharcfinz