diff options
Diffstat (limited to 'recipeBuddy/src/app/add-recipe/add-recipe.component.ts')
-rw-r--r-- | recipeBuddy/src/app/add-recipe/add-recipe.component.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/recipeBuddy/src/app/add-recipe/add-recipe.component.ts b/recipeBuddy/src/app/add-recipe/add-recipe.component.ts index b4f4d1e..50ea1cd 100644 --- a/recipeBuddy/src/app/add-recipe/add-recipe.component.ts +++ b/recipeBuddy/src/app/add-recipe/add-recipe.component.ts @@ -26,7 +26,7 @@ export class AddRecipeComponent { ingredients: this.fb.array([ this.fb.group({ ingrName: [''], - amount: [''], + amount: ['', Validators.pattern('^[0-9]*(\.[0-9]*)?$')], units: [''] }) ]), @@ -36,8 +36,8 @@ export class AddRecipeComponent { timer: [''] }) ]), - servingSize: [''], - cookTime: [''], + servingSize: ['', Validators.pattern('^[0-9]*(\.[0-9]*)?$')], + cookTime: ['', Validators.pattern('^[0-9]*$')], tags: [''], photos: [''] }); @@ -57,7 +57,7 @@ export class AddRecipeComponent { this.ingredients.push( this.fb.group({ ingrName: [''], - amount: [''], + amount: ['', Validators.pattern('^[0-9]*(\.[0-9]*)?$')], units: [''] }) ); @@ -75,7 +75,7 @@ export class AddRecipeComponent { this.steps.push( this.fb.group({ instruct: [''], - timer: [''] + timer: ['', Validators.pattern('^[0-9]*$')] }) ); } |