Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
How to remove readonly attribute when input doesn't qualify from bootstrap validator?

I have a form and the default is readonly for each input. Try to remove readonly attribute when input doesn't qualify the bootstrap validator.

  1. Is there any way to check form with bootstrap validator without submit the button? like checking inside document ready?

  2. How to remove readonly attribute when it doesn't qualify bootstrap validator checking?

        <div class="content">
    
            <div class="col-md-12 bg boxCover" >
    
                <div class="row">
                    <div class="col-md-12 col-sm-12">
                    <div class ="form-group">
                        <label for="nama">Nama Lengkap<span class="text-danger">*</span></label>
                        <input type="text" id="customerName" readonly name="customerName" value="<?php echo $customerName?>" required class="form-control clean">
                    </div>
                    </div>
                </div>
            </div>
        </div>
    

JS

$('#formInput').bootstrapValidator({
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            customerName: {
                validators: {
                    regexp: {
                        regexp: "^[A-Za-z., ]+$",
                        
                    }
                }
            }
        }
    });
about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!