
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@linode/validation
Advanced tools
This library consists of Yup schemas corresponding to the endpoints of the
Linode API, intended to be used for client-side validation.
They closely (though not exactly) match the validation that is run by the API back-end when a
request is received. They can be used to validate API request payloads manually or to validate forms (for example through
Formik’s validationSchema
). They also work well with the @linode/api-v4 package.
import { CreateLinodeSchema } from '@linode/validation';
const payload = { label: 'My Linode', type: 'g6-standard-1' };
CreateLinodeSchema.validateSync(payload);
// Uncaught: u [ValidationError]: Region is required.
NOTE: This feature is in development.
import { createLinode } from '@linode/api-v4';
import { CreateLinodeSchema } from '@linode/validation';
const payload = { label: 'My Linode', type: 'g6-standard-1' };
createLinode(payload, { schema: CreateLinodeSchema }).catch((error) => {
console.log(error);
});
// { field: 'region', reason: 'Region is required.' }
These schemas were originally included in the @linode/api-v4 package by default, and automatically applied before any network request was made. This worked well in the early days of Cloud Manager, especially before @linode/api-v4 was published as a separate package. However, as the project grew, this setup caused a few problems:
FAQs
Yup validation schemas for use with the Linode APIv4
We found that @linode/validation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.