You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+81Lines changed: 81 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1088,6 +1088,87 @@ export default App
1088
1088
value:'41111111XXXXXXXX',
1089
1089
};
1090
1090
```
1091
+
1092
+
### Override default error Messages
1093
+
1094
+
You can override the default error messages with custom ones by using `setErrorOverride`. This is especially useful to override default error messages in non-English languages.
1095
+
1096
+
To override error messages dynamically, you need to:
1097
+
1098
+
1. Create a ref using `React.useRef`.
1099
+
1100
+
2. Pass the ref to the Skyflow element for which you want to set the custom error.
1101
+
1102
+
3. Use `setErrorOverride` on ref.current to set the custom message.
1103
+
1104
+
`setErrorOverride` overrides the default error message when the value is invalid. The error resets automatically when the value becomes valid.
0 commit comments