Skip to content

Instantly share code, notes, and snippets.

@blooski
blooski / validateEmail
Created August 31, 2013 20:27
Validate Email
function validateEmail(email) {
var reg = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return reg.test(email);
}
@blooski
blooski / checkbox
Created August 6, 2013 00:31
Align checkbox with label, style
<form>
<div>
<label><input type="checkbox" /> Label text</label>
</div>
</form>
<style type="text/css">
label {
display: block;
padding-left: 15px;