Search Results

Search found 2 results on 1 pages for 'digitalspaghetti'.

Page 1/1 | 1 

  • jQuery password strength plugin callback validation method

    - by jmorhardt
    I'm using a a jQuery plugin to evaluate password strength. It gives a graphical representation for the user to see how secure the password is. I'd like to use it to validate the field as well. The plugin works by assessing the password and giving it a score. I want to be able to verify that the user has entered a password of at least a certain score. The code is hosted on jQuery's site here: http://plugins.jquery.com/project/pstrength. The documentation states that there is a way to add a rule and do custom validation. I'm not sure where to start. The inline documentation states: * === Changelog === * Version 2.1 (18/05/2008) * Added a jQuery method to add a new rule: jQuery('input[@type=password]').pstrength.addRule(name, method, score, active) And later in the code there's this method: jQuery.extend(jQuery.fn.pstrength, { 'addRule': function (name, method, score, active) { digitalspaghetti.password.addRule(name, method, score, active); return true; }, 'changeScore': function (rule, score) { digitalspaghetti.password.ruleScores[rule] = score; return true; }, 'ruleActive': function (rule, active) { digitalspaghetti.password.rules[rule] = active; return true; } }); If anybody has seen an example of how to do this I'd appreciate a pointer in the right direction. Thanks!

    Read the article

  • Apache complex regex crashing with 500 error

    - by digitalspaghetti
    I have been working with an existing website out company has running until I finish developing the new site. I've been asked to add some additional functionality to booking pages that will automatically set a booking button based on passed parameters. The existing working regex is as follows: RewriteRule ^.+-(\d+)\.accommodation$ property_detail.php?id=$1 Which works fine with the url like below and passes through the URL. this-is-the-property-name.1234.accomodation However as a quick shiv, I am trying to do the following: this-is-the-property-name.1234.accomodation?override=true&start_date=2010-05-14&numbernights=2&sleeps=10&price=1012 The regex I came up with for this was: RewriteRule ^.+-(\d+)\.accommodation\?override=(\w+)&start_date=(19|20)[0-9]{2}[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])&numbernights=(\d+)&sleeps=(\d+)&price=(\d+)$ property_detail.php?id=$1&override=$2&start_date=$3-$4-$5&numbernights=$6&sleeps=$7&price=$8 The regex is passing as valid in RegexBuddy - however it keeps causing a 500 error on the server. Can anyone help me get my head around this one?

    Read the article

1