
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
union-form is a dynamic form component for React with TypeScript and Tailwind CSS. It allows you to create flexible and configurable forms with built-in validation.
Install the package via npm:
npm install union-form
Here is an example of how to use the UnionForm component in a React application:
import React, { useState } from 'react';
import { DynamicForm, FormFieldIdentifier } from 'union-form';
const App: React.FC = () => {
const [formState, setFormState] = useState({
firstName: 'Amin Najafi',
age: 36,
address: 'New York!',
logo: '',
});
const [validations, setValidations] = useState({});
const [isValid, setIsValid] = useState(false);
const fields = [
{
key: 'firstName',
identifier: FormFieldIdentifier.TEXT,
label: 'First Name',
preemptWidth: 6,
locale: {
en: { message: 'First Name' },
fa: { message: 'نام' },
},
rules: [
{
criteria: { $ne: 'Bye' },
message: 'First name must not be Bye!',
},
(v) => v === 'Hello' || 'First name must be Hello!',
],
},
{
key: 'lastName',
identifier: FormFieldIdentifier.TEXT,
label: 'Last Name',
preemptWidth: 6,
locale: {
en: { message: 'Last Name' },
fa: { message: 'نام خانوادگی' },
},
},
{
key: 'logo',
identifier: FormFieldIdentifier.FILE,
label: 'Logo',
url: 'http://localhost:8080/api/v1/media',
locale: {
en: { message: 'Logo' },
fa: { message: 'لوگو' },
},
},
// Add other fields as necessary
];
return (
<UnionForm
target={formState}
fields={fields}
onUpdateValidations={setValidations}
onUpdateIsValid={setIsValid}
locale="fa" // Change to "en" for English
/>
);
};
export default App;
FAQs
Union form handling operations for your React.js applications
We found that union-form demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.