Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function()
- {
- $('#fieldIconsForm').bootstrapValidator(
- {
- feedbackIcons:
- {
- valid: 'glyphicon glyphicon-ok',
- invalid: 'glyphicon glyphicon-remove',
- validating: 'glyphicon glyphicon-refresh'
- },
- fields:
- {
- name:
- {
- feedbackIcons: 'false',
- validators:
- {
- notEmpty:
- {
- message: 'Name is required'
- }
- }
- },
- password:
- {
- feedbackIcons: false,
- validators:
- {
- notEmpty:
- {
- message: 'Password is required'
- }
- }
- }
- }
- }).on('success.form.bv', function(e)
- {
- e.preventDefault();
- checklogindetails();
- });
- });
- function checklogindetails()
- {
- $captcha = $( '#recaptcha' );
- response = grecaptcha.getResponse();
- if (response.length === 0) {
- alert('please verify yourself');
- }
- else
- {
- var username = $("#name").val().trim();
- var password = $("#password").val().trim();
- if (username === 'admin' && password === 'admin')
- {
- alert('Valid Credentials');
- }
- else
- {
- alert('Invalid Credentials');
- return false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement