Improve send form: check if address is valid using bitcore
This commit is contained in:
parent
5cfff0a189
commit
9d1f0082ea
3 changed files with 32 additions and 10 deletions
12
index.html
12
index.html
|
|
@ -79,7 +79,7 @@
|
|||
|
||||
<!-- Templates -->
|
||||
<script type="text/ng-template" id="signin.html">
|
||||
<div ng-controller="SigninController">
|
||||
<div class="signin" ng-controller="SigninController">
|
||||
<div data-alert class="alert-box info round" ng-show="loading">
|
||||
Connecting to wallet...
|
||||
</div>
|
||||
|
|
@ -369,11 +369,11 @@
|
|||
<div class="large-12 columns">
|
||||
<label for="address">To address
|
||||
<small ng-hide="!sendForm.address.$pristine">required</small>
|
||||
<small class="is-valid" ng-show="!sendForm.address.$invalid && !sendForm.address.$pristine">is valid!</small>
|
||||
<small class="is-valid" ng-show="!sendForm.address.$invalid && !sendForm.address.$pristine">valid!</small>
|
||||
<small class="has-error" ng-show="sendForm.address.$invalid && !sendForm.address.$pristine">
|
||||
is not valid</small>
|
||||
not valid</small>
|
||||
</label>
|
||||
<input type="text" id="address" name="address" placeholder="Send to" ng-model="address" ng-minlength="20" ng-maxlength="37" required>
|
||||
<input type="text" id="address" name="address" placeholder="Send to" ng-model="address" valid-address required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -382,9 +382,9 @@
|
|||
<div class="row collapse">
|
||||
<label for="amount">Amount
|
||||
<small ng-hide="!sendForm.amount.$pristine">required</small>
|
||||
<small class="is-valid" ng-show="!sendForm.amount.$invalid && !sendForm.amount.$pristine">is valid!</small>
|
||||
<small class="is-valid" ng-show="!sendForm.amount.$invalid && !sendForm.amount.$pristine">valid!</small>
|
||||
<small class="has-error" ng-show="sendForm.amount.$invalid && !sendForm.amount.$pristine">
|
||||
is not valid</small>
|
||||
not valid</small>
|
||||
</label>
|
||||
<div class="small-9 columns">
|
||||
<input type="number" id="amount" name="amount" placeholder="Amount" ng-model="amount" min="0.0001" max="10000000" required>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue