This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| VALIDATIONS = | |
| mobile_number: (val) -> val.match /[06]{1}[7]{1}[0-9]{8}/ | |
| zipcode: (val) -> val.match /^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$/ | |
| email: (val) -> val.match /^\S+@\S+\.\S+$/ | |
| personnummer: (val) -> | |
| console.log (val.match /[1-2][0|9][0-9]{2}[0-1][0-9][0-3][0-9][0-9]{4}/), val.length is 12 | |
| (val.match /[1-2][0|9][0-9]{2}[0-1][0-9][0-3][0-9][0-9]{4}/) and val.length is 12 | |
| module.exports = ($form, validation) -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Server | |
| mongoose: require 'mongoose' | |
| express: require 'express' | |
| path = require 'path' | |
| constructor: -> | |
| @app = @express() | |
| @app.use @express.static(path.resolve "public") | |
| @app.use @express.bodyParser() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Embed | |
| embedded: false | |
| width: 250 | |
| height: 250 | |
| name: "something" | |
| baseURL: "//s3-eu-west-1.amazonaws.com/some-bucket" | |
| constructor: (@script) -> | |
| @width = @script.width if @script.width | |
| @height = @script.height if @script.height |
NewerOlder