
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@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 Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.