
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
vue-use-form
Advanced tools
# npm
npm i vue-use-form
# pnpm
pnpm i vue-use-form
# yarn
yarn add vue-use-form
<script setup lang="ts">
import { useForm } from 'vue-use-form'
interface Inputs {
username: string
password: string
age: number
}
const {
formState,
register,
createSubmitHandler,
createErrorHandler,
reset,
handleSubmit,
setError,
clearErrors,
setValue,
setFocus,
getValues,
triggerValidate,
getFieldState,
unregister,
} = useForm<Inputs>({
mode: 'onChange',
shouldFocusError: true,
})
const [usernameField, usernameRef] = register('username', {
required: 'Username is required!',
minLength: { value: 3, message: 'Username must be at least 3 characters' },
maxLength: { value: 10, message: 'Username must be at most 10 characters' },
validate: (value) => {
if (value === 'admin') {
return 'Username is reserved!'
}
},
})
const [passwordField, passwordRef] = register('password', {
required: 'Password is required!',
minLength: { value: 8, message: 'Password must be at least 8 characters' },
maxLength: { value: 20, message: 'Password must be at most 20 characters' },
validate: {
isContainLowercase: (value) => {
if (!/[a-z]/.test(value)) {
return 'Password must contain at least one lowercase letter'
}
},
isContainUppercase: (value) => {
if (!/[A-Z]/.test(value)) {
return 'Password must contain at least one uppercase letter'
}
},
},
})
const [ageField, ageRef] = register('age', {
required: 'Age is required!',
min: { value: 18, message: 'Age must be at least 18' },
max: { value: 10000, message: '?' },
valueAsNumber: true,
})
const onSubmit = createSubmitHandler((data) => {
console.log('validate success', data)
})
const onError = createErrorHandler((errors) => {
console.log('validate error', errors)
})
</script>
<template>
<form @submit.prevent="handleSubmit(onSubmit, onError)()">
<input ref="usernameRef" v-model="usernameField" name="username">
<input ref="passwordRef" v-model="passwordField" name="password">
<input ref="ageRef" v-model="ageField" type="number" name="age">
<button type="submit" v-text="'Submit'" />
</form>
</template>
FAQs
```bash # npm npm i vue-use-form
We found that vue-use-form demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.