cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

                  <div id="app" class="container">
        <h1>Vue Password Strength Indicator</h1>
        <label class="frmLabel" for="password">Password</label>
        <input placeholder="Enter your password" name="password" class="frmField" type="password" @input="password_check" v-model="message" /> 
        <p class="frmValidation" :class="{'frmValidation--passed' : message.length > 7}"><i class="frmIcon fas" :class="message.length > 7 ? 'fa-check' : 'fa-times'"></i> Longer than 7 characters</p>
        <p class="frmValidation" :class="{'frmValidation--passed' :has_uppercase }"><i class="frmIcon fas" :class="has_uppercase ? 'fa-check' : 'fa-times'"></i> Has a capital letter</p>
        <p class="frmValidation" :class="{'frmValidation--passed' :has_lowercase }"><i class="frmIcon fas" :class="has_lowercase ? 'fa-check' : 'fa-times'"></i> Has a lowercase letter</p>
        <p class="frmValidation" :class="{'frmValidation--passed' : has_number }"><i class="frmIcon fas" :class="has_number ? 'fa-check' : 'fa-times'"></i> Has a number</p>
        <p class="frmValidation" :class="{'frmValidation--passed' : has_special }"><i class="frmIcon fas" :class="has_special ? 'fa-check' : 'fa-times'"></i> Has a special character</p>
    </div><!-- #app  -->
<p class="howToBuild"><a href="http://duaneblake.co.uk/?p=672" target="_blank">Tutorial on how to build this&raquo;</a></p>

                      body{background-color: #EFEFEF;}
        .container{width:400px; margin:50px auto; background: white; padding:10px; font-family: Arial, Helvetica, sans-serif, sans-serif; border-radius: 3px;}
        h1{ font-size: 24px; text-align: center; text-transform: uppercase;}
        .frmField{background-color:white; color:#495057; line-height: 1.25; font-size: 16px; font-family: 'Roboto', sans-serif; border:0; padding: 10px; border:1px solid #dbdbdb;  border-radius: 3px; width:90%;}
        .frmLabel{display: block; margin-bottom: 10px; font-weight: bold;}
        .frmValidation{font-size: 13px; }
            .frmValidation--passed .frmIcon{color:#0fa140;}   

.howToBuild{ text-align:center; color:purple;}
.howToBuild a{ color:grey; font-weight:bold; text-decoration:none; text-transform:uppercase; }
               let app = new Vue({
            el: '#app',
                message:       '',
                has_number:    false,
                has_lowercase: false,
                has_uppercase: false,
                has_special:   false,
            methods: {
                password_check: function () {
                    this.has_number    = /\d/.test(this.message);
                    this.has_lowercase = /[a-z]/.test(this.message);
                    this.has_uppercase = /[A-Z]/.test(this.message);
                    this.has_special   = /[!@#\$%\^\&*\)\(+=._-]/.test(this.message);
Loading ..................