TREVOR.MORSE

Raptr Forum Signature

twitter.com/trevor_morse:

    Saw this tonight, if you get the chance definitely do!

    — 2 months ago
    #movies 
    UFO over Norway? →

    UFO Over Norway: Residents Baffled By Mysterious Swirling Blue Light In The Sky (VIDEO)

    — 3 months ago
    New version of web2project

    Web2project v1.2 has been released! It includes 10 new features, over 30 bug fixes, and over 10 miscellaneous improvements. Check out the release notes here, or get to downloading here.

    — 3 months ago
    Regex for restricting length of field in javascript with multiple lines

    So recently I have been doing some work in Wordpress and more specifically the cformsII plugin. This is a great plugin for generating quick forms, however it does it’s validation in javascript.

    One of the requirements was for a multi-line text input that was no longer then 500 characters. This is easily done with the plugin, but the regex generated looks like this.

    ^.{0,500}

    The problem with this is that it will match any character except the newline up to 500. Obviously for a multi-line text input you want to allow newlines. The javascript character for matching any whitespace character including newlines is \s and matching any character other then whitespace is \S. So if you change the javascript for validation to the following it will match any character, including newlines up to 500 characters.

    ^[\s\S]{0,500}

    — 3 months ago
    #javascript  #regex  #wordpress  #cformsII 
    Congrats to Shawn and Ashley on their ENGAGEMENT!

    Congrats to Shawn and Ashley on their ENGAGEMENT!

    — 3 months ago
    #family  #engagement 
    vim as a development environment →

    I <3 vim, this link has some great tips and tricks

    — 3 months ago
    #vim