feat(app): add manual entry and sharing flows
This commit is contained in:
@@ -67,9 +67,7 @@ class RestaurantFormValidator {
|
||||
}
|
||||
|
||||
// 전화번호 패턴: 02-1234-5678, 010-1234-5678 등
|
||||
final phoneRegex = RegExp(
|
||||
r'^0\d{1,2}-?\d{3,4}-?\d{4}$',
|
||||
);
|
||||
final phoneRegex = RegExp(r'^0\d{1,2}-?\d{3,4}-?\d{4}$');
|
||||
|
||||
if (!phoneRegex.hasMatch(phoneNumber.replaceAll(' ', ''))) {
|
||||
return '올바른 전화번호 형식이 아닙니다';
|
||||
@@ -100,7 +98,7 @@ class RestaurantFormValidator {
|
||||
|
||||
// 허용된 카테고리 목록 (필요시 추가)
|
||||
// final allowedCategories = [
|
||||
// '한식', '중식', '일식', '양식', '아시안',
|
||||
// '한식', '중식', '일식', '양식', '아시안',
|
||||
// '카페', '디저트', '분식', '패스트푸드', '기타'
|
||||
// ];
|
||||
|
||||
@@ -119,8 +117,8 @@ class RestaurantFormValidator {
|
||||
/// 필수 필드만 검증
|
||||
static bool hasRequiredFields(RestaurantFormData formData) {
|
||||
return formData.name.isNotEmpty &&
|
||||
formData.category.isNotEmpty &&
|
||||
formData.roadAddress.isNotEmpty;
|
||||
formData.category.isNotEmpty &&
|
||||
formData.roadAddress.isNotEmpty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,11 +140,11 @@ class FormFieldErrors {
|
||||
this.phoneNumber,
|
||||
});
|
||||
|
||||
bool get hasErrors =>
|
||||
name != null ||
|
||||
category != null ||
|
||||
roadAddress != null ||
|
||||
latitude != null ||
|
||||
bool get hasErrors =>
|
||||
name != null ||
|
||||
category != null ||
|
||||
roadAddress != null ||
|
||||
latitude != null ||
|
||||
longitude != null ||
|
||||
phoneNumber != null;
|
||||
|
||||
@@ -160,4 +158,4 @@ class FormFieldErrors {
|
||||
if (phoneNumber != null) map['phoneNumber'] = phoneNumber!;
|
||||
return map;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user