Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
ampersand-checkbox-view
Advanced tools
Readme
A view module for intelligently rendering and validating checkbox input. Works well with ampersand-form-view.
It does the following:
Depdent on two micro-libs, so works well with ampersand apps, backbone apps or anything else, really.
npm install ampersand-checkbox-view
var CheckboxView = require('ampersand-checkbox-view');
var field = new CheckboxView({
// form input `name`
name: 'client_name',
// You can replace the built-in template with your own.
// just give it an html string. Make sure it has a single "root" element that contains:
// - an `<input>` element
// - an element with a `role="label"` attribute
// - an element with a `role="message-container"` attribute (this we'll show/hide)
// - an elememt with a `role="message-text"` attribute (where message text goes for error)
template: // some HTML string
// Label name
label: 'App Name',
// optinal intial value if it has one
value: true, // or false
// optional, this is the element that will be
// replaced by this view. If you don't
// give it one, it will create one.
el: document.getElementByID('field'),
// whether or not this field is required
required: true, // true by default
// class to set on input when input is valid
validClass: 'input-valid', // <- that's the default
// type value to use for the input tag's type value
type: 'text',
// class to set on input when input is valid
invalidClass: 'input-invalid', // <- that's the default
// Message to use if error is that it's required
// but no value was set.
requiredMessage: 'This box must be checked.',
// optional, you can pass in the parent view explicitly
parent: someViewInstance
});
// append it somewhere or use it in side an ampersand-form-view
document.querySelector('form').appendChild(field.el);
Created by @HenrikJoreteg.
MIT
FAQs
A view module for intelligently rendering and validating checkbox input. Works well with ampersand-form-view.
The npm package ampersand-checkbox-view receives a total of 88 weekly downloads. As such, ampersand-checkbox-view popularity was classified as not popular.
We found that ampersand-checkbox-view demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.