├── .gitignore ├── AndroidGif.gif ├── LICENSE ├── README.md ├── ValidationsXFSample.Android ├── Assets │ └── AboutAssets.txt ├── MainActivity.cs ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs ├── Resources │ ├── AboutResources.txt │ ├── Resource.designer.cs │ ├── layout │ │ ├── Tabbar.xml │ │ └── Toolbar.xml │ ├── mipmap-anydpi-v26 │ │ ├── icon.xml │ │ └── icon_round.xml │ ├── mipmap-hdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-mdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-xhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-xxhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-xxxhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ └── values │ │ ├── colors.xml │ │ └── styles.xml └── ValidationsXFSample.Android.csproj ├── ValidationsXFSample.iOS ├── AppDelegate.cs ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon1024.png │ │ ├── Icon120.png │ │ ├── Icon152.png │ │ ├── Icon167.png │ │ ├── Icon180.png │ │ ├── Icon20.png │ │ ├── Icon29.png │ │ ├── Icon40.png │ │ ├── Icon58.png │ │ ├── Icon60.png │ │ ├── Icon76.png │ │ ├── Icon80.png │ │ └── Icon87.png ├── Entitlements.plist ├── Info.plist ├── Main.cs ├── Properties │ └── AssemblyInfo.cs ├── Resources │ ├── Default-568h@2x.png │ ├── Default-Portrait.png │ ├── Default-Portrait@2x.png │ ├── Default.png │ ├── Default@2x.png │ └── LaunchScreen.storyboard └── ValidationsXFSample.iOS.csproj ├── ValidationsXFSample.sln ├── ValidationsXFSample ├── App.xaml ├── App.xaml.cs ├── AssemblyInfo.cs ├── FodyWeavers.xml ├── FodyWeavers.xsd ├── Helpers │ ├── Behaviours │ │ ├── BehaviorBase.cs │ │ └── EntryLineValidationBehaviour.cs │ ├── Converters │ │ ├── FirstValidationErrorConverter.cs │ │ └── InverseBoolConverter.cs │ └── Validators │ │ ├── IValidatable.cs │ │ ├── IValidationRule.cs │ │ ├── Rules │ │ ├── HasValidAgeRule.cs │ │ ├── IsLenghtValidRule.cs │ │ ├── IsNotNullOrEmptyRule.cs │ │ ├── IsValidEmailRule.cs │ │ ├── IsValidPasswordRule.cs │ │ ├── IsValueTrueRule.cs │ │ └── MatchPairValidationRule.cs │ │ ├── ValidatableObject.cs │ │ └── ValidatablePair.cs ├── ValidationsXFSample.csproj ├── ViewModels │ └── RegisterPageViewModel.cs └── Views │ ├── RegisterPage.xaml │ └── RegisterPage.xaml.cs └── iOSGif.gif /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | -------------------------------------------------------------------------------- /AndroidGif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/AndroidGif.gif -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 CrossGeeks 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Validation Xamarin Forms Sample 2 | 3 | 4 |

5 | 6 |         7 | 8 |

9 | 10 | 11 | Blog post: https://xamgirl.com 12 | -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /ValidationsXFSample.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Android.App; 4 | using Android.Content.PM; 5 | using Android.Runtime; 6 | using Android.Views; 7 | using Android.Widget; 8 | using Android.OS; 9 | 10 | namespace ValidationsXFSample.Droid 11 | { 12 | [Activity(Label = "ValidationsXFSample", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 13 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity 14 | { 15 | protected override void OnCreate(Bundle savedInstanceState) 16 | { 17 | TabLayoutResource = Resource.Layout.Tabbar; 18 | ToolbarResource = Resource.Layout.Toolbar; 19 | 20 | base.OnCreate(savedInstanceState); 21 | 22 | Xamarin.Essentials.Platform.Init(this, savedInstanceState); 23 | global::Xamarin.Forms.Forms.Init(this, savedInstanceState); 24 | global::Xamarin.Forms.FormsMaterial.Init(this, savedInstanceState); 25 | LoadApplication(new App()); 26 | 27 | } 28 | public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults) 29 | { 30 | Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); 31 | 32 | base.OnRequestPermissionsResult(requestCode, permissions, grantResults); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("ValidationsXFSample.Android")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("ValidationsXFSample.Android")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | [assembly: AssemblyVersion("1.0.0.0")] 26 | [assembly: AssemblyFileVersion("1.0.0.0")] 27 | 28 | // Add some common permissions, these can be removed if not needed 29 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)] 30 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] 31 | -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.xml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable-hdpi/ 12 | icon.png 13 | 14 | drawable-ldpi/ 15 | icon.png 16 | 17 | drawable-mdpi/ 18 | icon.png 19 | 20 | layout/ 21 | main.xml 22 | 23 | values/ 24 | strings.xml 25 | 26 | In order to get the build system to recognize Android resources, set the build action to 27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 28 | instead operate on resource IDs. When you compile an Android application that uses resources, 29 | the build system will package the resources for distribution and generate a class called 30 | "Resource" that contains the tokens for each one of the resources included. For example, 31 | for the above Resources layout, this is what the Resource class would expose: 32 | 33 | public class Resource { 34 | public class drawable { 35 | public const int icon = 0x123; 36 | } 37 | 38 | public class layout { 39 | public const int main = 0x456; 40 | } 41 | 42 | public class strings { 43 | public const int first_string = 0xabc; 44 | public const int second_string = 0xbcd; 45 | } 46 | } 47 | 48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main 49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first 50 | string in the dictionary file values/strings.xml. 51 | -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/layout/Tabbar.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/layout/Toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/mipmap-anydpi-v26/icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/mipmap-anydpi-v26/icon_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/mipmap-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.Android/Resources/mipmap-hdpi/icon.png -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/mipmap-hdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.Android/Resources/mipmap-hdpi/launcher_foreground.png -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/mipmap-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.Android/Resources/mipmap-mdpi/icon.png -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/mipmap-mdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.Android/Resources/mipmap-mdpi/launcher_foreground.png -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/mipmap-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.Android/Resources/mipmap-xhdpi/icon.png -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/mipmap-xhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.Android/Resources/mipmap-xhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/mipmap-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.Android/Resources/mipmap-xxhdpi/icon.png -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/mipmap-xxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.Android/Resources/mipmap-xxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/mipmap-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.Android/Resources/mipmap-xxxhdpi/icon.png -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | #3F51B5 5 | #303F9F 6 | #FF4081 7 | -------------------------------------------------------------------------------- /ValidationsXFSample.Android/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 24 | 27 | -------------------------------------------------------------------------------- /ValidationsXFSample.Android/ValidationsXFSample.Android.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF} 7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 8 | {c9e5eea5-ca05-42a1-839b-61506e0a37df} 9 | Library 10 | ValidationsXFSample.Droid 11 | ValidationsXFSample.Android 12 | True 13 | True 14 | Resources\Resource.designer.cs 15 | Resource 16 | Properties\AndroidManifest.xml 17 | Resources 18 | Assets 19 | v9.0 20 | true 21 | true 22 | Xamarin.Android.Net.AndroidClientHandler 23 | 24 | 25 | 26 | 27 | true 28 | portable 29 | false 30 | bin\Debug 31 | DEBUG; 32 | prompt 33 | 4 34 | None 35 | 36 | 37 | true 38 | portable 39 | true 40 | bin\Release 41 | prompt 42 | 4 43 | true 44 | false 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 4.6.0.800 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF} 96 | ValidationsXFSample 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace ValidationsXFSample.iOS 9 | { 10 | // The UIApplicationDelegate for the application. This class is responsible for launching the 11 | // User Interface of the application, as well as listening (and optionally responding) to 12 | // application events from iOS. 13 | [Register("AppDelegate")] 14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 15 | { 16 | // 17 | // This method is invoked when the application has loaded and is ready to run. In this 18 | // method you should instantiate the window, load the UI into it and then make the window 19 | // visible. 20 | // 21 | // You have 17 seconds to return from this method, or iOS will terminate your application. 22 | // 23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 24 | { 25 | global::Xamarin.Forms.Forms.Init(); 26 | global::Xamarin.Forms.FormsMaterial.Init(); 27 | LoadApplication(new App()); 28 | 29 | return base.FinishedLaunching(app, options); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "scale": "2x", 5 | "size": "20x20", 6 | "idiom": "iphone", 7 | "filename": "Icon40.png" 8 | }, 9 | { 10 | "scale": "3x", 11 | "size": "20x20", 12 | "idiom": "iphone", 13 | "filename": "Icon60.png" 14 | }, 15 | { 16 | "scale": "2x", 17 | "size": "29x29", 18 | "idiom": "iphone", 19 | "filename": "Icon58.png" 20 | }, 21 | { 22 | "scale": "3x", 23 | "size": "29x29", 24 | "idiom": "iphone", 25 | "filename": "Icon87.png" 26 | }, 27 | { 28 | "scale": "2x", 29 | "size": "40x40", 30 | "idiom": "iphone", 31 | "filename": "Icon80.png" 32 | }, 33 | { 34 | "scale": "3x", 35 | "size": "40x40", 36 | "idiom": "iphone", 37 | "filename": "Icon120.png" 38 | }, 39 | { 40 | "scale": "2x", 41 | "size": "60x60", 42 | "idiom": "iphone", 43 | "filename": "Icon120.png" 44 | }, 45 | { 46 | "scale": "3x", 47 | "size": "60x60", 48 | "idiom": "iphone", 49 | "filename": "Icon180.png" 50 | }, 51 | { 52 | "scale": "1x", 53 | "size": "20x20", 54 | "idiom": "ipad", 55 | "filename": "Icon20.png" 56 | }, 57 | { 58 | "scale": "2x", 59 | "size": "20x20", 60 | "idiom": "ipad", 61 | "filename": "Icon40.png" 62 | }, 63 | { 64 | "scale": "1x", 65 | "size": "29x29", 66 | "idiom": "ipad", 67 | "filename": "Icon29.png" 68 | }, 69 | { 70 | "scale": "2x", 71 | "size": "29x29", 72 | "idiom": "ipad", 73 | "filename": "Icon58.png" 74 | }, 75 | { 76 | "scale": "1x", 77 | "size": "40x40", 78 | "idiom": "ipad", 79 | "filename": "Icon40.png" 80 | }, 81 | { 82 | "scale": "2x", 83 | "size": "40x40", 84 | "idiom": "ipad", 85 | "filename": "Icon80.png" 86 | }, 87 | { 88 | "scale": "1x", 89 | "size": "76x76", 90 | "idiom": "ipad", 91 | "filename": "Icon76.png" 92 | }, 93 | { 94 | "scale": "2x", 95 | "size": "76x76", 96 | "idiom": "ipad", 97 | "filename": "Icon152.png" 98 | }, 99 | { 100 | "scale": "2x", 101 | "size": "83.5x83.5", 102 | "idiom": "ipad", 103 | "filename": "Icon167.png" 104 | }, 105 | { 106 | "scale": "1x", 107 | "size": "1024x1024", 108 | "idiom": "ios-marketing", 109 | "filename": "Icon1024.png" 110 | } 111 | ], 112 | "properties": {}, 113 | "info": { 114 | "version": 1, 115 | "author": "xcode" 116 | } 117 | } -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIDeviceFamily 6 | 7 | 1 8 | 2 9 | 10 | UISupportedInterfaceOrientations 11 | 12 | UIInterfaceOrientationPortrait 13 | UIInterfaceOrientationLandscapeLeft 14 | UIInterfaceOrientationLandscapeRight 15 | 16 | UISupportedInterfaceOrientations~ipad 17 | 18 | UIInterfaceOrientationPortrait 19 | UIInterfaceOrientationPortraitUpsideDown 20 | UIInterfaceOrientationLandscapeLeft 21 | UIInterfaceOrientationLandscapeRight 22 | 23 | MinimumOSVersion 24 | 8.0 25 | CFBundleDisplayName 26 | ValidationsXFSample 27 | CFBundleIdentifier 28 | com.crossgeeks.ValidationsXFSample 29 | CFBundleVersion 30 | 1.0 31 | UILaunchStoryboardName 32 | LaunchScreen 33 | CFBundleName 34 | ValidationsXFSample 35 | XSAppIconAssets 36 | Assets.xcassets/AppIcon.appiconset 37 | 38 | 39 | -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace ValidationsXFSample.iOS 9 | { 10 | public class Application 11 | { 12 | // This is the main entry point of the application. 13 | static void Main(string[] args) 14 | { 15 | // if you want to use a different Application Delegate class from "AppDelegate" 16 | // you can specify it here. 17 | UIApplication.Main(args, null, "AppDelegate"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ValidationsXFSample.iOS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ValidationsXFSample.iOS")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Resources/Default.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrossGeeks/ValidationXFSample/8ca6c84f7228f0e6d82dc4c1727ca08351dd7ec9/ValidationsXFSample.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/Resources/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /ValidationsXFSample.iOS/ValidationsXFSample.iOS.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | iPhoneSimulator 6 | 8.0.30703 7 | 2.0 8 | {4674317C-D11C-4208-80F6-B10FBB2D3D17} 9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | {6143fdea-f3c2-4a09-aafa-6e230626515e} 11 | Exe 12 | ValidationsXFSample.iOS 13 | Resources 14 | ValidationsXFSample.iOS 15 | true 16 | NSUrlSessionHandler 17 | automatic 18 | 19 | 20 | true 21 | full 22 | false 23 | bin\iPhoneSimulator\Debug 24 | DEBUG 25 | prompt 26 | 4 27 | x86_64 28 | None 29 | true 30 | 31 | 32 | none 33 | true 34 | bin\iPhoneSimulator\Release 35 | prompt 36 | 4 37 | None 38 | x86_64 39 | 40 | 41 | true 42 | full 43 | false 44 | bin\iPhone\Debug 45 | DEBUG 46 | prompt 47 | 4 48 | ARM64 49 | iPhone Developer 50 | true 51 | Entitlements.plist 52 | None 53 | -all 54 | 55 | 56 | none 57 | true 58 | bin\iPhone\Release 59 | prompt 60 | 4 61 | ARM64 62 | iPhone Developer 63 | Entitlements.plist 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | false 76 | 77 | 78 | false 79 | 80 | 81 | false 82 | 83 | 84 | false 85 | 86 | 87 | false 88 | 89 | 90 | false 91 | 92 | 93 | false 94 | 95 | 96 | false 97 | 98 | 99 | false 100 | 101 | 102 | false 103 | 104 | 105 | false 106 | 107 | 108 | false 109 | 110 | 111 | false 112 | 113 | 114 | false 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 4.6.0.800 130 | 131 | 132 | 133 | 134 | 135 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF} 136 | ValidationsXFSample 137 | 138 | 139 | -------------------------------------------------------------------------------- /ValidationsXFSample.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ValidationsXFSample.Android", "ValidationsXFSample.Android\ValidationsXFSample.Android.csproj", "{2B7858DE-336E-4D69-BBD9-666E199CD9AF}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ValidationsXFSample.iOS", "ValidationsXFSample.iOS\ValidationsXFSample.iOS.csproj", "{4674317C-D11C-4208-80F6-B10FBB2D3D17}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ValidationsXFSample", "ValidationsXFSample\ValidationsXFSample.csproj", "{B58F76F2-5EBE-4684-B141-24AFB78F84DF}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | Debug|iPhoneSimulator = Debug|iPhoneSimulator 15 | Release|iPhoneSimulator = Release|iPhoneSimulator 16 | Debug|iPhone = Debug|iPhone 17 | Release|iPhone = Release|iPhone 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF}.Release|Any CPU.Build.0 = Release|Any CPU 24 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 25 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 26 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 27 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 28 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF}.Debug|iPhone.ActiveCfg = Debug|Any CPU 29 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF}.Debug|iPhone.Build.0 = Debug|Any CPU 30 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF}.Release|iPhone.ActiveCfg = Release|Any CPU 31 | {2B7858DE-336E-4D69-BBD9-666E199CD9AF}.Release|iPhone.Build.0 = Release|Any CPU 32 | {4674317C-D11C-4208-80F6-B10FBB2D3D17}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator 33 | {4674317C-D11C-4208-80F6-B10FBB2D3D17}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator 34 | {4674317C-D11C-4208-80F6-B10FBB2D3D17}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator 35 | {4674317C-D11C-4208-80F6-B10FBB2D3D17}.Release|Any CPU.Build.0 = Release|iPhoneSimulator 36 | {4674317C-D11C-4208-80F6-B10FBB2D3D17}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator 37 | {4674317C-D11C-4208-80F6-B10FBB2D3D17}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator 38 | {4674317C-D11C-4208-80F6-B10FBB2D3D17}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator 39 | {4674317C-D11C-4208-80F6-B10FBB2D3D17}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator 40 | {4674317C-D11C-4208-80F6-B10FBB2D3D17}.Debug|iPhone.ActiveCfg = Debug|iPhone 41 | {4674317C-D11C-4208-80F6-B10FBB2D3D17}.Debug|iPhone.Build.0 = Debug|iPhone 42 | {4674317C-D11C-4208-80F6-B10FBB2D3D17}.Release|iPhone.ActiveCfg = Release|iPhone 43 | {4674317C-D11C-4208-80F6-B10FBB2D3D17}.Release|iPhone.Build.0 = Release|iPhone 44 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 45 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF}.Debug|Any CPU.Build.0 = Debug|Any CPU 46 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF}.Release|Any CPU.ActiveCfg = Release|Any CPU 47 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF}.Release|Any CPU.Build.0 = Release|Any CPU 48 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 49 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 50 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 51 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 52 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF}.Debug|iPhone.ActiveCfg = Debug|Any CPU 53 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF}.Debug|iPhone.Build.0 = Debug|Any CPU 54 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF}.Release|iPhone.ActiveCfg = Release|Any CPU 55 | {B58F76F2-5EBE-4684-B141-24AFB78F84DF}.Release|iPhone.Build.0 = Release|Any CPU 56 | EndGlobalSection 57 | EndGlobal 58 | -------------------------------------------------------------------------------- /ValidationsXFSample/App.xaml: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | 10 | #0341B6 11 | 12 | 16 | 17 | 20 | 21 | 26 | 27 | 30 | 31 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ValidationsXFSample/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using ValidationsXFSample.Views; 2 | using Xamarin.Forms; 3 | 4 | namespace ValidationsXFSample 5 | { 6 | public partial class App : Application 7 | { 8 | public App() 9 | { 10 | InitializeComponent(); 11 | 12 | MainPage = new RegisterPage(); 13 | } 14 | 15 | protected override void OnStart() 16 | { 17 | } 18 | 19 | protected override void OnSleep() 20 | { 21 | } 22 | 23 | protected override void OnResume() 24 | { 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ValidationsXFSample/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms.Xaml; 2 | 3 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)] -------------------------------------------------------------------------------- /ValidationsXFSample/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /ValidationsXFSample/FodyWeavers.xsd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Used to control if the On_PropertyName_Changed feature is enabled. 12 | 13 | 14 | 15 | 16 | Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form. 17 | 18 | 19 | 20 | 21 | Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project. 22 | 23 | 24 | 25 | 26 | Used to control if equality checks should use the Equals method resolved from the base class. 27 | 28 | 29 | 30 | 31 | Used to control if equality checks should use the static Equals method resolved from the base class. 32 | 33 | 34 | 35 | 36 | Used to turn off build warnings from this weaver. 37 | 38 | 39 | 40 | 41 | Used to turn off build warnings about mismatched On_PropertyName_Changed methods. 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. 50 | 51 | 52 | 53 | 54 | A comma-separated list of error codes that can be safely ignored in assembly verification. 55 | 56 | 57 | 58 | 59 | 'false' to turn off automatic generation of the XML Schema file. 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Behaviours/BehaviorBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace ValidationsXFSample.Helpers.Behaviours 5 | { 6 | public class BehaviorBase : Behavior 7 | where T : BindableObject 8 | { 9 | #region Properties 10 | public T AssociatedObject 11 | { 12 | get; 13 | private set; 14 | } 15 | #endregion 16 | #region NormalMethods 17 | private void OnBindingContextChanged(object sender, EventArgs e) 18 | { 19 | OnBindingContextChanged(); 20 | } 21 | #endregion 22 | #region Overrides 23 | protected override void OnAttachedTo(T bindable) 24 | { 25 | base.OnAttachedTo(bindable); 26 | AssociatedObject = bindable; 27 | if (bindable.BindingContext != null) 28 | { 29 | BindingContext = bindable.BindingContext; 30 | } 31 | 32 | bindable.BindingContextChanged += OnBindingContextChanged; 33 | } 34 | protected override void OnDetachingFrom(T bindable) 35 | { 36 | base.OnDetachingFrom(bindable); 37 | bindable.BindingContextChanged -= OnBindingContextChanged; 38 | AssociatedObject = null; 39 | } 40 | protected override void OnBindingContextChanged() 41 | { 42 | base.OnBindingContextChanged(); 43 | BindingContext = AssociatedObject.BindingContext; 44 | } 45 | #endregion 46 | } 47 | } -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Behaviours/EntryLineValidationBehaviour.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace ValidationsXFSample.Helpers.Behaviours 5 | { 6 | public class EntryLineValidationBehaviour : BehaviorBase 7 | { 8 | #region StaticFields 9 | public static readonly BindableProperty IsValidProperty = BindableProperty.Create(nameof(IsValid), typeof(bool), typeof(EntryLineValidationBehaviour), true, BindingMode.Default, null, (bindable, oldValue, newValue) => OnIsValidChanged(bindable, newValue)); 10 | #endregion 11 | #region Properties 12 | public bool IsValid 13 | { 14 | get 15 | { 16 | return (bool)GetValue(IsValidProperty); 17 | } 18 | set 19 | { 20 | SetValue(IsValidProperty, value); 21 | } 22 | } 23 | #endregion 24 | #region StaticMethods 25 | private static void OnIsValidChanged(BindableObject bindable, object newValue) 26 | { 27 | if (bindable is EntryLineValidationBehaviour IsValidBehavior && 28 | newValue is bool IsValid) 29 | { 30 | IsValidBehavior.AssociatedObject.PlaceholderColor = IsValid ? Color.Default : Color.Red; 31 | } 32 | } 33 | 34 | #endregion 35 | } 36 | } -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Converters/FirstValidationErrorConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using Xamarin.Forms; 6 | 7 | namespace ValidationsXFSample.Helpers.Converters 8 | { 9 | public class FirstValidationErrorConverter : IValueConverter 10 | { 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | ICollection errors = value as ICollection; 14 | return errors != null && errors.Count > 0 ? errors.ElementAt(0) : null; 15 | } 16 | 17 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 18 | { 19 | return null; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Converters/InverseBoolConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using Xamarin.Forms; 4 | 5 | namespace ValidationsXFSample.Helpers.Converters 6 | { 7 | public class InverseBoolConverter : IValueConverter 8 | { 9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 10 | { 11 | if (!(value is bool)) 12 | { 13 | throw new InvalidOperationException("The target must be a boolean"); 14 | } 15 | 16 | return !(bool)value; 17 | } 18 | 19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 20 | { 21 | return null; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Validators/IValidatable.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | 4 | namespace ValidationsXFSample.Validators 5 | { 6 | public interface IValidatable : INotifyPropertyChanged 7 | { 8 | List> Validations { get; } 9 | 10 | List Errors { get; set; } 11 | 12 | bool Validate(); 13 | 14 | bool IsValid { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Validators/IValidationRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace ValidationsXFSample.Validators 3 | { 4 | public interface IValidationRule 5 | { 6 | string ValidationMessage { get; set; } 7 | bool Check(T value); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Validators/Rules/HasValidAgeRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace ValidationsXFSample.Validators.Rules 3 | { 4 | public class HasValidAgeRule : IValidationRule 5 | { 6 | public string ValidationMessage { get; set; } 7 | 8 | public bool Check(T value) 9 | { 10 | if (value is DateTime bday) 11 | { 12 | DateTime today = DateTime.Today; 13 | int age = today.Year - bday.Year; 14 | return (age >= 18); 15 | } 16 | 17 | return false; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Validators/Rules/IsLenghtValidRule.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace ValidationsXFSample.Validators.Rules 3 | { 4 | public class IsLenghtValidRule : IValidationRule 5 | { 6 | public string ValidationMessage { get; set; } 7 | public int MinimunLenght { get; set; } 8 | public int MaximunLenght { get; set; } 9 | 10 | public bool Check(T value) 11 | { 12 | if (value == null) 13 | { 14 | return false; 15 | } 16 | 17 | var str = value as string; 18 | return (str.Length > MinimunLenght && str.Length <= MaximunLenght); 19 | } 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Validators/Rules/IsNotNullOrEmptyRule.cs: -------------------------------------------------------------------------------- 1 | namespace ValidationsXFSample.Validators.Rules 2 | { 3 | public class IsNotNullOrEmptyRule : IValidationRule 4 | { 5 | public string ValidationMessage { get; set; } 6 | 7 | public bool Check(T value) 8 | { 9 | if (value == null) 10 | { 11 | return false; 12 | } 13 | 14 | var str = $"{value }"; 15 | return !string.IsNullOrWhiteSpace(str); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Validators/Rules/IsValidEmailRule.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace ValidationsXFSample.Validators.Rules 3 | { 4 | public class IsValidEmailRule : IValidationRule 5 | { 6 | public string ValidationMessage { get; set; } 7 | 8 | public bool Check(T value) 9 | { 10 | try 11 | { 12 | var addr = new System.Net.Mail.MailAddress($"{value}"); 13 | return addr.Address == $"{value}"; 14 | } 15 | catch 16 | { 17 | return false; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Validators/Rules/IsValidPasswordRule.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Text.RegularExpressions; 3 | 4 | namespace ValidationsXFSample.Validators.Rules 5 | { 6 | public class IsValidPasswordRule : IValidationRule 7 | { 8 | public string ValidationMessage { get; set; } 9 | public Regex RegexPassword { get; set; } = new Regex("(?=.*[A-Z])(?=.*\\d)(?=.*[¡!@#$%*¿?\\-_.\\(\\)])[A-Za-z\\d¡!@#$%*¿?\\-\\(\\)&]{8,20}"); 10 | 11 | public bool Check(T value) 12 | { 13 | return (RegexPassword.IsMatch($"{value}")); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Validators/Rules/IsValueTrueRule.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace ValidationsXFSample.Validators.Rules 3 | { 4 | public class IsValueTrueRule : IValidationRule 5 | { 6 | public string ValidationMessage { get; set; } 7 | 8 | public bool Check(T value) 9 | { 10 | return bool.Parse($"{value}"); 11 | } 12 | } 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Validators/Rules/MatchPairValidationRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | 4 | namespace ValidationsXFSample.Validators.Rules 5 | { 6 | public class MatchPairValidationRule : IValidationRule> 7 | { 8 | public string ValidationMessage { get; set; } 9 | 10 | public bool Check(ValidatablePair value) 11 | { 12 | return value.Item1.Value.Equals(value.Item2.Value); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Validators/ValidatableObject.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | using System.Linq; 4 | 5 | namespace ValidationsXFSample.Validators 6 | { 7 | public class ValidatableObject : IValidatable 8 | { 9 | public event PropertyChangedEventHandler PropertyChanged; 10 | 11 | public List> Validations { get; } = new List>(); 12 | 13 | public List Errors { get; set; } = new List(); 14 | 15 | public bool CleanOnChange { get; set; } = true; 16 | 17 | T _value; 18 | public T Value 19 | { 20 | get=>_value; 21 | set 22 | { 23 | _value = value; 24 | 25 | if (CleanOnChange) 26 | IsValid = true; 27 | } 28 | } 29 | 30 | public bool IsValid { get; set; } = true; 31 | 32 | public virtual bool Validate() 33 | { 34 | Errors.Clear(); 35 | 36 | IEnumerable errors = Validations.Where(v => !v.Check(Value)) 37 | .Select(v => v.ValidationMessage); 38 | 39 | Errors = errors.ToList(); 40 | IsValid = !Errors.Any(); 41 | 42 | return this.IsValid; 43 | } 44 | public override string ToString() 45 | { 46 | return $"{Value}"; 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /ValidationsXFSample/Helpers/Validators/ValidatablePair.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | using System.Linq; 4 | 5 | namespace ValidationsXFSample.Validators 6 | { 7 | public class ValidatablePair : IValidatable> 8 | { 9 | public List>> Validations { get; } = new List>>(); 10 | 11 | public bool IsValid { get; set; } = true; 12 | 13 | public List Errors { get; set; } = new List(); 14 | 15 | public ValidatableObject Item1 { get; set; } = new ValidatableObject(); 16 | 17 | public ValidatableObject Item2 { get; set; } = new ValidatableObject(); 18 | 19 | public event PropertyChangedEventHandler PropertyChanged; 20 | 21 | public bool Validate() 22 | { 23 | var item1IsValid = Item1.Validate(); 24 | var item2IsValid = Item2.Validate(); 25 | if (item1IsValid && item2IsValid) 26 | { 27 | Errors.Clear(); 28 | 29 | IEnumerable errors = Validations.Where(v => !v.Check(this)) 30 | .Select(v => v.ValidationMessage); 31 | 32 | Errors = errors.ToList(); 33 | Item2.Errors = Errors; 34 | Item2.IsValid = !Errors.Any(); 35 | } 36 | 37 | IsValid = !Item1.Errors.Any() && !Item2.Errors.Any(); 38 | 39 | return this.IsValid; 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /ValidationsXFSample/ValidationsXFSample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | portable 10 | true 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ValidationsXFSample/ViewModels/RegisterPageViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Windows.Input; 4 | using ValidationsXFSample.Validators; 5 | using ValidationsXFSample.Validators.Rules; 6 | using Xamarin.Forms; 7 | 8 | namespace ValidationsXFSample.ViewModels 9 | { 10 | public class RegisterPageViewModel: INotifyPropertyChanged 11 | { 12 | public ValidatableObject FirstName { get; set; } = new ValidatableObject(); 13 | public ValidatableObject LastName { get; set; } = new ValidatableObject(); 14 | public ValidatableObject BirthDay { get; set; } = new ValidatableObject() { Value = DateTime.Now }; 15 | public ValidatableObject PhoneNumber { get; set; } = new ValidatableObject(); 16 | public ValidatablePair Email { get; set; } = new ValidatablePair(); 17 | public ValidatablePair Password { get; set; } = new ValidatablePair(); 18 | public ValidatableObject TermsAndCondition { get; set; } = new ValidatableObject(); 19 | 20 | public RegisterPageViewModel() 21 | { 22 | AddValidationRules(); 23 | } 24 | 25 | public void AddValidationRules() 26 | { 27 | FirstName.Validations.Add(new IsNotNullOrEmptyRule { ValidationMessage = "First Name Required" }); 28 | LastName.Validations.Add(new IsNotNullOrEmptyRule { ValidationMessage = "Last Name Required" }); 29 | BirthDay.Validations.Add(new HasValidAgeRule { ValidationMessage = "You must be 18 years of age or older" }); 30 | PhoneNumber.Validations.Add(new IsNotNullOrEmptyRule { ValidationMessage = "Phone Number Required" }); 31 | PhoneNumber.Validations.Add(new IsLenghtValidRule { ValidationMessage = "Phone Number should have a maximun of 10 digits and minimun of 8", MaximunLenght = 10, MinimunLenght = 8 }); 32 | 33 | //Email Validation Rules 34 | Email.Item1.Validations.Add(new IsNotNullOrEmptyRule { ValidationMessage = "Email Required" }); 35 | Email.Item1.Validations.Add(new IsValidEmailRule { ValidationMessage = "Invalid Email" }); 36 | Email.Item2.Validations.Add(new IsNotNullOrEmptyRule { ValidationMessage = "Confirm Email Required" }); 37 | Email.Validations.Add(new MatchPairValidationRule { ValidationMessage = "Email and confirm email don't match" }); 38 | 39 | //Password Validation Rules 40 | Password.Item1.Validations.Add(new IsNotNullOrEmptyRule { ValidationMessage = "Password Required" }); 41 | Password.Item1.Validations.Add(new IsValidPasswordRule { ValidationMessage = "Password between 8-20 characters; must contain at least one lowercase letter, one uppercase letter, one numeric digit, and one special character" }); 42 | Password.Item2.Validations.Add(new IsNotNullOrEmptyRule { ValidationMessage = "Confirm password required" }); 43 | Password.Validations.Add(new MatchPairValidationRule { ValidationMessage = "Password and confirm password don't match" }); 44 | 45 | TermsAndCondition.Validations.Add(new IsValueTrueRule { ValidationMessage = "Please accept tems and condition" }); 46 | } 47 | 48 | 49 | public ICommand SignUpCommand => new Command(async () => 50 | { 51 | if (AreFieldsValid()) 52 | { 53 | await App.Current.MainPage.DisplayAlert("Welcome", "", "Ok"); 54 | } 55 | }); 56 | 57 | bool AreFieldsValid() 58 | { 59 | bool isFirstNameValid = FirstName.Validate(); 60 | bool isLastNameValid = LastName.Validate(); 61 | bool isBirthDayValid = BirthDay.Validate(); 62 | bool isPhoneNumberValid = PhoneNumber.Validate(); 63 | bool isEmailValid = Email.Validate(); 64 | bool isPasswordValid = Password.Validate(); 65 | bool isTermsAndConditionValid = TermsAndCondition.Validate(); 66 | 67 | return isFirstNameValid && isLastNameValid && isBirthDayValid 68 | && isPhoneNumberValid && isEmailValid && isPasswordValid && isTermsAndConditionValid; 69 | } 70 | 71 | public event PropertyChangedEventHandler PropertyChanged; 72 | 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /ValidationsXFSample/Views/RegisterPage.xaml: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 |