Skip to content

Commit

Permalink
πŸ”¨ κ·Έλ£Ή μœ ν˜• λΉ„κ³΅κ°œμΌ λ•Œ κ°€μž… 방식을 ν•œ 개 이상 μ„ νƒν•˜λ„λ‘ rules μΆ”κ°€
Browse files Browse the repository at this point in the history
  • Loading branch information
ttaerrim committed Jan 28, 2024
1 parent 07fcb71 commit facb1d6
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@ type GroupJoin = 'approve' | 'code';

export function GroupJoinTypeCheckbox({
control,
required,
}: {
control: Control<GroupCreate>;
required: boolean;
}) {
const {
field: { value, onChange },
} = useController({
name: 'joinType',
control,
rules: {
validate: {
moreThanOne: (v) => required && v.length > 0,
},
},
});

const onChangeCheckbox = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand Down

0 comments on commit facb1d6

Please sign in to comment.