
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@seo_dev/react-card-hooks
Advanced tools
신용카드 입력을 위한 React 커스텀 훅과 유효성 검사 함수 모음입니다. 카드 번호, CVC, 만료일, 비밀번호 입력을 안전하게 처리할 수 있습니다.
신용카드 결제 정보를 쉽게 입력하고 검증할 수 있도록 돕는 React용 커스텀 훅 모음입니다. CVC, 카드번호, 만료일, 비밀번호 입력 필드 유효성 검사 및 상태 관리를 자동으로 처리해줍니다.
Hook | 기능 |
---|---|
useCardNumber() | 카드 번호 입력 상태 및 유효성 검사 및 카드사 검사 |
useCvc() | CVC 입력 상태 및 유효성 검사 (3자리 숫자) |
useExpiration() | 만료월/년 입력 상태 및 유효성 검사 |
usePassword() | 카드 비밀번호 앞 2자리 입력 상태 및 유효성 검사 |
npm install @seo_dev/react-card-hooks
# 또는
yarn add @seo_dev/react-card-hooks
import { useCardNumber, useCvc, useExpiration, usePassword } from '@seo_dev/react-card-hooks';
function CardForm() {
const { cardNumber, cardCompany, errorState: cardError, handleCardNumberChange } = useCardNumber();
const { cvc, errorState: cvcError, handleCvcChange } = useCvc();
const { expiration, errorState: expError, handleExpirationChange } = useExpiration();
const { password, errorState: pwError, handlePasswordChange } = usePassword();
return (
<form>
<div>
<p>카드사: {cardCompany}</p>
<input value={cardNumber} onChange={(e) => handleCardNumberChange(e.target.value)} />
{cardError.errorMessage && <p>{cardError.errorMessage}</p>}
</div>
<div>
<input value={cvc} onChange={handleCvcChange} />
{cvcError.errorMessage && <p>{cvcError.errorMessage}</p>}
</div>
<div>
<input value={expiration.month} onChange={(e) => handleExpirationChange(e, 'month')} />
<input value={expiration.year} onChange={(e) => handleExpirationChange(e, 'year')} />
{expError.errorMessage && <p>{expError.errorMessage}</p>}
</div>
<div>
<input value={password} onChange={handlePasswordChange} />
{pwError.errorMessage && <p>{pwError.errorMessage}</p>}
</div>
</form>
);
}
useCardNumber()
string
'숫자만 입력해주세요.'
카드사 | 조건 | 예시 |
---|---|---|
visa | 4로 시작하는 16자리 카드 번호 | 4234 5678 9123 4567 |
masterCard | 51~55로 시작하는 16자리 카드 번호 | 5123 4567 8901 2345 |
AMEX | 34,37로 시작하는 15자리 카드 번호 | 3412 345678 90123 |
Diners | 36으로 시작하는 14자리 카드 번호 | 3612 345678 9012 |
UnionPay | 622126 ~ 622925로 시작하는 16자리 카드 번호 624 ~ 626로 시작하는 16자리 카드 번호 6282 ~ 6288로 시작하는 16자리 카드 번호 | 6241 2345 6789 0123 |
useCvc()
useExpiration()
{ month, year }
usePassword()
MIT License
© 2025 jin123457
FAQs
신용카드 입력을 위한 React 커스텀 훅과 유효성 검사 함수 모음입니다. 카드 번호, CVC, 만료일, 비밀번호 입력을 안전하게 처리할 수 있습니다.
We found that @seo_dev/react-card-hooks 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.