mirror of
https://github.com/Nezumi-2711/react-training.git
synced 2026-09-22 13:38:51 +00:00
Fix code style format
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user