adds french & fixes translation issues
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { parse } from "date-fns";
|
||||
import { date, number, object, string } from "yup";
|
||||
|
||||
class SummitLog {
|
||||
id?: string;
|
||||
@@ -13,14 +11,5 @@ class SummitLog {
|
||||
}
|
||||
}
|
||||
|
||||
const summitLogSchema = object<SummitLog>({
|
||||
id: string().optional(),
|
||||
date: date().transform((value, originalValue, context) => {
|
||||
if (context.isType(value)) return value;
|
||||
return parse(originalValue, 'dd.MM.yyyy', new Date());
|
||||
}).required('Required').typeError('Invalid Date'),
|
||||
text: string().optional(),
|
||||
});
|
||||
|
||||
|
||||
export { SummitLog, summitLogSchema }
|
||||
export { SummitLog };
|
||||
|
||||
Reference in New Issue
Block a user