fix: complete field and OTP public contracts (HD-07)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/** Snapshot native readonly validity flags without retaining a live DOM object. */
|
||||
export function validitySnapshot(value?: ValidityState): ValidityState {
|
||||
return {
|
||||
badInput: value?.badInput ?? false,
|
||||
customError: value?.customError ?? false,
|
||||
patternMismatch: value?.patternMismatch ?? false,
|
||||
rangeOverflow: value?.rangeOverflow ?? false,
|
||||
rangeUnderflow: value?.rangeUnderflow ?? false,
|
||||
stepMismatch: value?.stepMismatch ?? false,
|
||||
tooLong: value?.tooLong ?? false,
|
||||
tooShort: value?.tooShort ?? false,
|
||||
typeMismatch: value?.typeMismatch ?? false,
|
||||
valid: value?.valid ?? true,
|
||||
valueMissing: value?.valueMissing ?? false,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user