@pdg/react-form 1.0.82 → 1.0.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4712,13 +4712,13 @@ function autoDash$1(companyNo) {
4712
4712
  /********************************************************************************************************************
4713
4713
  * Event Handler
4714
4714
  * ******************************************************************************************************************/
4715
- var className = _a.className, onValue = _a.onValue, onValidate = _a.onValidate, props = __rest$4(_a, ["className", "onValue", "onValidate"]);
4715
+ var className = _a.className, skipPersonalNumberValidateCheck = _a.skipPersonalNumberValidateCheck, onValue = _a.onValue, onValidate = _a.onValidate, props = __rest$4(_a, ["className", "skipPersonalNumberValidateCheck", "onValue", "onValidate"]);
4716
4716
  var handleValue = React.useCallback(function (value) {
4717
4717
  var newValue = autoDash(value.replace(/[^0-9]/gi, ''));
4718
4718
  return onValue ? onValue(newValue) : newValue;
4719
4719
  }, [onValue]);
4720
4720
  var handleValidate = React.useCallback(function (value) {
4721
- if (notEmpty(value)) {
4721
+ if (notEmpty(value) && !skipPersonalNumberValidateCheck) {
4722
4722
  if (value.length === 14 && value.includes('-')) {
4723
4723
  var jumin = value
4724
4724
  .replace(/-/g, '')
@@ -4750,7 +4750,7 @@ function autoDash$1(companyNo) {
4750
4750
  else {
4751
4751
  return onValidate ? onValidate(value) : true;
4752
4752
  }
4753
- }, [onValidate]);
4753
+ }, [onValidate, skipPersonalNumberValidateCheck]);
4754
4754
  /********************************************************************************************************************
4755
4755
  * Render
4756
4756
  * ******************************************************************************************************************/