Fix code style format

This commit is contained in:
2023-10-27 11:31:03 +07:00
parent 4ab846da3c
commit e95ac9c4ca
3 changed files with 91 additions and 44 deletions
+9
View File
@@ -1,3 +1,4 @@
import { invalidFormatMessage } from '../constants/messages';
import { TKeyValue, TPropValues, TStateSchema } from '../globals/types';
const VALUE = 'value';
@@ -27,10 +28,18 @@ const getPropValues = (stateSchema: TStateSchema, prop?: TPropValues) => {
}, {} as TKeyValue);
};
const addValidator = (func: (input: string) => boolean, error: string) => {
return {
func: func,
error: invalidFormatMessage(error),
};
};
export {
isObject,
isRequired,
getPropValues,
addValidator,
VALUE,
ERROR,
REQUIRED_FIELD_ERROR,