Skip to content

Instantly share code, notes, and snippets.

View jsobell's full-sized avatar

Jason Sobell jsobell

View GitHub Profile
@jsobell
jsobell / app.html
Created October 10, 2016 22:43 — forked from jawa-the-hutt/app.html
Aurelia Validation Demo - updateTrigger issue?
<template>
<form submit.delegate="submit()">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="name">Name</label>
<input type="text" class="form-control" id="name" placeholder="Name"
value.bind="user.name & validate">
</div>
@jsobell
jsobell / address.js
Last active September 16, 2016 12:24 — forked from dtaalbers/address.js
Aurelia Validation - Why is ensureObject not being called?
import { ValidationRules } from 'aurelia-validation';
export class Address {
street;
city;
}
/*ValidationRules
.ensure(a => a.street).required()
.ensure(a => a.city).required()
@jsobell
jsobell / app.html
Created September 7, 2016 23:41
Aurelia Validation Demo - Events during render...
<template>
<require from='subinput'></require>
<form submit.delegate="submit()">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="first">First Name</label>
<select value.bind="firstName & updateTrigger:'input' & validate">
<option value='Jason'>Jason</option>
@jsobell
jsobell / app.html
Last active September 7, 2016 12:03
Aurelia Validation Demo - Events during render...
<template>
<require from='subinput'></require>
<form submit.delegate="submit()">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="first">First Name</label>
<select value.bind="firstName & updateTrigger:'input' & validate">
<option value='Jason'>Jason</option>
@jsobell
jsobell / app.html
Last active September 7, 2016 23:41
Aurelia Validation Demo - Events during render...
<template>
<require from='subinput'></require>
<form submit.delegate="submit()">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="first">First Name</label>
<select value.bind="firstName & updateTrigger:'input' & validate">
<option value='Jason'>Jason</option>
@jsobell
jsobell / app.html
Last active September 6, 2016 22:56
Aurelia Validation Demo - Test reset errors
<template>
<form submit.delegate="submit()">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="last">First Name</label>
<input type="text" class="form-control" id="last" placeholder="Last Name"
value.bind="fname & validate">
</div>
@jsobell
jsobell / app.html
Last active February 22, 2018 15:50
Aurelia Validation Demo - Nested object properties - working
<template>
<form submit.delegate="submit()">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="fst">First Name</label>
<input type="text" class="form-control" id="fst" placeholder="Last Name"
value.bind="user.fname & validate">
</div>
@jsobell
jsobell / app.html
Last active September 14, 2016 08:02
Aurelia Validation Demo - SubElement
<template>
<require from='subinput'></require>
<form submit.delegate="submit()">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="first">First Name</label>
<select value.bind="firstName & updateTrigger:'input' & validate">
<option value='Jason'>Jason</option>
<option value='Fred'>Fred</option>
@jsobell
jsobell / app.html
Last active October 9, 2020 10:10
Validation without bindings...
<template>
<form submit.delegate="submit()" novalidate autocomplete="off">
<div>
<button type="submit" class="btn btn-primary">Submit</button>
<button class="btn btn-success" click.delegate='reset()'>Reset</button>
<button class="btn btn-info" click.delegate='silent()'>Check...</button>${silentResult}
</div>
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
@jsobell
jsobell / app.html
Last active September 4, 2016 10:49
Silent Validation check...
<template>
<form submit.delegate="submit()" novalidate autocomplete="off">
<div>
<button type="submit" class="btn btn-primary">Submit</button>
<button class="btn btn-success" click.delegate='reset()'>Reset</button>
<button class="btn btn-info" click.delegate='silent()'>Check...</button>${silentResult}
</div>
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">