mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-25 01:58:39 +02:00
Fix is valid
This commit is contained in:
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -40,14 +40,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
|
||||||
- name: Setup Go
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.22'
|
|
||||||
|
|
||||||
- name: Install Yaak CLI
|
|
||||||
run: go install github.com/yaakapp/yaakcli@latest
|
|
||||||
|
|
||||||
- name: install Rust stable
|
- name: install Rust stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -59,9 +59,10 @@ export const PlainInput = forwardRef<HTMLInputElement, PlainInputProps>(function
|
|||||||
|
|
||||||
const isValid = useMemo(() => {
|
const isValid = useMemo(() => {
|
||||||
if (require && !validateRequire(currentValue)) return false;
|
if (require && !validateRequire(currentValue)) return false;
|
||||||
if (validate && !validate(currentValue)) return false;
|
if (typeof validate === 'boolean') return validate;
|
||||||
|
if (typeof validate === 'function' && !validate(currentValue)) return false;
|
||||||
return true;
|
return true;
|
||||||
}, [currentValue, validate, require]);
|
}, [require, currentValue, validate]);
|
||||||
|
|
||||||
const handleChange = useCallback(
|
const handleChange = useCallback(
|
||||||
(value: string) => {
|
(value: string) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user