package Ġcom . learn . todo app . presentation . utils Ċ Ċ import Ġandroidx . core . util . Patterns Compat . EMAIL _ ADDRESS Ċ import Ġcom . learn . todo app . R Ċ import Ġcom . learn . todo app . presentation . utils . models . Validation Response Ċ Ċ fun ĠString ?. is Email Valid (): ĠValidation Response Ġ{ ĊĊĠĠĠ Ġreturn Ġwhen Ġ{ ĊĠĠĠĠĠĠĠ Ġis Null OrEmpty () Ġ-> ĠValidation Response . Validation Failure ( R . string . empty _ email ) ĊĠĠĠĠĠĠĠ Ġ! EMAIL _ ADDRESS . matcher ( this ). matches () Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ ĠValidation Response . Validation Failure ( R . string . invalid _ email ) ĊĠĠĠĠĠĠĠ Ġelse Ġ-> ĠValidation Response . Validation Success ĊĠĠĠ Ġ} Ċ } Ċ Ċ fun ĠString ?. is Password Valid (): ĠValidation Response Ġ{ ĊĠĠĠ Ġreturn Ġwhen Ġ{ ĊĠĠĠĠĠĠĠ Ġis Null OrEmpty () Ġ-> ĠValidation Response . Validation Failure ( R . string . empty _ password ) ĊĠĠĠĠĠĠĠ Ġlength Ġ< Ġ 5 Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ ĠValidation Response . Validation Failure ( R . string . password _ min _ length ) ĊĠĠĠĠĠĠĠ Ġelse Ġ-> ĠValidation Response . Validation Success ĊĊĠĠĠ Ġ} Ċ } Ċ Ċ fun ĠString ?. is Todo Title Valid (): ĠValidation Response Ġ{ ĊĠĠĠ Ġreturn Ġwhen Ġ{ ĊĠĠĠĠĠĠĠ Ġis Null OrEmpty () Ġ-> ĠValidation Response . Validation Failure ( R . string . empty _ todo _ title ) ĊĠĠĠĠĠĠĠ Ġelse Ġ-> ĠValidation Response . Validation Success ĊĊĠĠĠ Ġ} Ċ } ĊĊ