Skip to content

Commit

Permalink
Merge pull request #84 from shaheerahmadch/Advanced-Validations-UDF
Browse files Browse the repository at this point in the history
Initial Commit for Advanced Validations UDF
  • Loading branch information
Katerina-Chernevskaya committed Apr 10, 2024
2 parents b52a8c7 + 0d8e3fd commit 805d6f6
Show file tree
Hide file tree
Showing 47 changed files with 28,528 additions and 0 deletions.
66 changes: 66 additions & 0 deletions samples/advanced-validations-udf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Advanced Validations UDF

## Summary

Experience the power of advanced validation techniques with our User Defined Function (UDF) component library. Seamlessly integrate these advanced validation functionalities into your canvas apps, enhancing user input validation and ensuring data accuracy.

🔍 Explore a comprehensive set of validation techniques designed to meet diverse validation requirements, from basic email validation to complex custom patterns.

💡 Empower your canvas apps with real-time validation feedback, improving user experience and data integrity.

![Advanced Validations UDF](./assets/preview.png)

## Applies to

![Power Apps](https://img.shields.io/badge/Power%20Apps-Yes-green "Yes")

## Compatibility
![Premium License](https://img.shields.io/badge/Premium%20License-Not%20Required-red.svg "Premium license not required")
![Experimental Features](https://img.shields.io/badge/Experimental%20Features-No-red.svg "Does not rely on experimental features")

## Contributors

* [Shaheer Ahmad](https://github.com/shaheerahmadch)

## Version history

Version|Date|Comments
-------|----|--------
1.0|18 March, 2024|Initial release

## Prerequisites

* Power Apps Environment

## Solution Components

The following solution components are included in this library:

* Advanced Validations (Component Library)

## Minimal Path to Awesome

1. Clone the repository or [download](./solution/advanced-validations-udf.zip) the component library files.
2. Import the component library into your Power Apps environment.
3. Access the advanced validation functions within your canvas apps.

## Features

The Advanced Validations UDF component library offers the following features:

* Seamless integration with canvas apps for enhanced validation capabilities.
* User-defined functions for complex validation scenarios, including email validation, custom patterns, and more.
* Real-time feedback mechanisms to improve user experience and data quality.

## Help

For questions regarding this sample, [create a new question](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=advanced-validations-udf&authors=@shaheerahmadch&title=advanced-validations-udf%20-%20).

## Disclaimer

**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

<img src="https://m365-visitor-stats.azurewebsites.net/powerplatform-samples/samples/advanced-validations-udf" />


Feel free to leverage the Advanced Validations UDF component library to enhance your canvas apps with sophisticated validation techniques! 🚀✨
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions samples/advanced-validations-udf/assets/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[
{
"name": "pnp-powerplatform-samples-advanced-validations-udf",
"source": "pnp",
"title": "Advanced Validations UDF",
"shortDescription": "Experience the power of advanced validation techniques with our User Defined Function (UDF) component library.",
"url": "https://github.com/pnp/powerplatform-samples/tree/main/samples/advanced-validations-udf",
"downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/powerplatform-samples/tree/main/samples/advanced-validations-udf",
"longDescription": [
"Experience the power of advanced validation techniques with our User Defined Function (UDF) component library. Seamlessly integrate these advanced validation functionalities into your canvas apps, enhancing user input validation and ensuring data accuracy."
],
"creationDateTime": "2024-03-18",
"updateDateTime": "2024-03-18",
"products": [
"Power Apps"
],
"tags": [
"Validation"
],
"categories": [
"CANVAS"
],
"metadata": [
{
"key": "POWERAPPS-EXPERIMENTAL",
"value": "No"
},
{
"key": "POWERAPPS-PREMIUM",
"value": "No"
},
{
"key": "POWERAPPS-ONPREM",
"value": "No"
},
{
"key": "POWERAPPS-CUSTOMCONNECTOR",
"value": "No"
}
],
"thumbnails": [
{
"type": "image",
"order": 100,
"url": "https://github.com/pnp/powerplatform-samples/raw/main/samples/advanced-validations-udf/assets/preview.png",
"alt": "App preview"
}
],
"authors": [
{
"gitHubAccount": "shaheerahmadch",
"pictureUrl": "https://github.com/shaheerahmadch.png",
"name": "Shaheer Ahmad"
}
],
"references": [
{
"name": "Microsoft Power Platform documentation",
"description": "Discover how to make the most of Microsoft Power Platform products with online training courses, docs, and videos covering product capabilities and how-to guides.",
"url": "https://learn.microsoft.com/power-platform/"
}
]
}
]
Binary file not shown.
8 changes: 8 additions & 0 deletions samples/advanced-validations-udf/sourcecode/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# msbuild output directories
/bin
/obj

# MSBuild Binary and Structured Log
*.binlog
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PowerAppsTargetsPath>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps</PowerAppsTargetsPath>
</PropertyGroup>

<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
<Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.props" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.props')" />

<PropertyGroup>
<ProjectGuid>0fb2347c-bfd7-4fb3-8027-9a98aed9b63e</ProjectGuid>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<!--Remove TargetFramework when this is available in 16.1-->
<TargetFramework>net462</TargetFramework>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<SolutionRootPath>src</SolutionRootPath>
</PropertyGroup>

<!--
Solution Packager overrides, un-comment to use: SolutionPackagerType (Managed, Unmanaged, Both)
Solution Localization Control, if you want to enabled localization of your solution, un-comment SolutionPackageEnableLocalization and set the value to true. - Requires use of -loc flag on Solution Clone or Sync
-->
<!--
<PropertyGroup>
<SolutionPackageType>Managed</SolutionPackageType>
<SolutionPackageEnableLocalization>false</SolutionPackageEnableLocalization>
</PropertyGroup>
-->

<ItemGroup>
<PackageReference Include="Microsoft.PowerApps.MSBuild.Solution" Version="1.*" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\.gitignore" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\bin\**" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\obj\**" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.cdsproj" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.cdsproj.user" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.sln" />
</ItemGroup>

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\**" Exclude="@(ExcludeDirectories)" />
<Content Include="$(SolutionPackageZipFilePath)">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
<Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.targets" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.targets')" />

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"__Version":"0.1","App":"c84e2840-ddb6-4654-bb0c-8cd6ede18462","Test_7F478737223C4B69":"b48d03e1-66e4-461b-a2f6-2a2328808f00","Host":"c39bfbab-c1fd-46a1-84c0-5002f949d545","UserDefinedFunctions":"9f34253d-11a9-4ad3-941b-0e8a6b6095fd","Validate Email":"3715df1c-8fb5-496d-bc18-ff079db21dc1","Container1":"43513d97-aa22-4d40-b7d3-0e7afb4d2120","UDF":"01db310c-57c1-42b1-8683-29074d99b22b","Container2":"fcd09e5a-70a0-40df-b146-15dcd8a25714","TextInput1":"2bbc77f4-89d9-4ecd-8872-01f7c522d897","Container2_1":"f213b316-c3b9-4f01-8222-de4cecb5cea6","Label2":"d8be666b-3690-4f05-96d0-07da381225e7","Gallery1_1":"54fbbfa7-df89-41a4-bacf-f2a92eddb725","Label1_2":"7ca17194-e519-43d3-901d-cf327b09a878","Label1_6":"5fbd3290-1a72-4019-a03d-2cacb8e6a956","Button1":"cc9bb7b3-e53a-4753-b76d-8dc29aaf5b8b","Validate Password":"2f2856ce-1646-497b-87f9-8d15764ac885","Container1_1":"8e567a31-b857-469d-be37-7ae60f027226","User Defined Function":"5f7688c0-6a6f-4a19-8db4-27a8ffdaa875","Container2_2":"934e259a-1151-436f-ba60-7653bb6e245f","TextInput1_1":"2536e891-12cc-4f3e-af92-1617676a77c1","Button1_1":"6d44560f-e2eb-416d-b390-8a4982f548ef","Container2_3":"55560db5-ce92-4c73-a9a0-7ea0dd25ca43","Label2_1":"e14dcfe7-43fb-4a89-b982-43971e1b7952","Label1_4":"fcc21c3b-3a37-4c8a-ad37-ff9178bd9f7a","Label2_2":"1d63d8fb-3bfb-418a-9552-f03b3e226b30","Label2_3":"774c4f8b-e051-48ec-ae05-16305798f4fa","Gallery1":"a1c61574-99c6-4ade-b7f9-27be6f19ba4a","galleryTemplate1":"7d263ff8-a8df-48d0-9131-84f07c6091ae","Title4_1":"79e39a9b-1120-4e18-96d3-c18bc854df2a","Icon1_1":"110d24c0-0212-4a87-b35d-9a4e061df768","Icon1":"2aaf9578-8cce-4700-b315-00415cabff5c","Label1_5":"233cfee9-84ee-4b39-91db-3716e099248e","galleryTemplate1_1":"00b1a059-c255-49cb-b191-dddca13b7409","Title4":"2edb60ea-a32c-4ca0-afef-56c557d4902d","Validate Phone Number":"8f454a11-09cd-4167-86a1-c92636c7985b","Container1_2":"17ab5a1e-a75b-467f-b473-8e1c9c34ac92","Label2_4":"0645337f-cc78-4e3e-a043-48b7d8b23b86","Container2_4":"3caf04dd-049d-46ea-940a-bf4fea303cb8","TextInput1_2":"c14e8892-364b-4783-961e-646fbb214de3","Button1_2":"2c253e74-92dc-44fa-8ee9-89b171738dd7","Container2_5":"3acc4dd5-2d25-4b29-9c8c-531570a95992","Label2_5":"d2e4ac99-6c24-483f-849e-552103b91841","Label1_7":"4df76d3a-06d4-4d6a-a1dc-4ab8d4971f26","Label1_8":"e9859a12-bdd2-4074-ba1f-145ee6bd1b81","Gallery1_2":"ffcb5ab6-eb7a-4dfa-90dd-b59e0b7e9077","galleryTemplate1_2":"48b5fa7c-c4f4-4d41-927e-ccfdeac1f0b2","Icon1_2":"d572b9f9-9480-454b-835f-ba412890557b","Title4_2":"382fd400-87ba-4d5e-b1a1-e3bf954b59cd","Validate URL":"999947e7-ca12-48f6-b8cd-2679c6cce3b8","Container1_3":"b718b96c-d2a9-4961-81f0-123ecfe693e9","Label2_6":"a5615955-3526-40b4-b8cd-c9e29bc969d8","Container2_6":"ab06a5f2-42d6-4c1f-a11c-45c8e1c5805a","TextInput1_3":"d3c27cb0-a89b-4d42-b9df-3a691df3d128","Button1_3":"0c5879ac-4dd7-4302-8b95-f9c41369d5a4","Container2_7":"cef1b69f-5e5f-4338-8fc3-78164d378a1a","Label2_7":"164db558-540a-44c3-a7e1-0d590d0d8a36","Label1_9":"ce675842-d440-40b9-a117-d3fc3e41fe58","Label1_10":"7133320e-3dae-4b86-abe1-ac9c0ef48697","Gallery1_3":"3f99a149-70e5-4186-81e1-b7a7a51405f8","galleryTemplate1_3":"c577d58a-8e46-4626-b1f8-b235ca24fbfe","Icon1_3":"94e55d8c-d633-44db-b232-cb1479c98e21","Title4_3":"bc1c7f1c-4100-4022-8b65-72fc467edf50","Toggle2":"4b373a37-3024-4d2e-bac8-cf0181a6a79b","Toggle2_1":"3425d95a-e8c5-4b13-b5f0-a17242bec89e","Toggle2_2":"c601019a-432d-4978-861c-c845dccfd273","Toggle2_3":"f36532be-956c-4aef-a577-92a69d2eda6c"}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<CanvasApp xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>sa_userdefinedformulasregularexpressionvalidations_8b660</Name>
<AppVersion>2024-03-17T13:10:16Z</AppVersion>
<Status>Ready</Status>
<CreatedByClientVersion>3.24031.25.0</CreatedByClientVersion>
<MinClientVersion>3.24031.25.0</MinClientVersion>
<Tags>{"primaryDeviceWidth":"640","primaryDeviceHeight":"1136","supportsPortrait":"true","supportsLandscape":"true","primaryFormFactor":"Phone","showStatusBar":"false","publisherVersion":"3.24031.25","minimumRequiredApiVersion":"2.2.0","hasComponent":"true","hasUnlockedComponent":"true","isUnifiedRootApp":"false","offlineLargeFilesSupport":"false"}</Tags>
<IsCdsUpgraded>0</IsCdsUpgraded>
<GalleryItemId xsi:nil="true"></GalleryItemId>
<BackgroundColor>RGBA(251,101,60,1)</BackgroundColor>
<DisplayName>User Defined Formulas - Regular Expression Validations</DisplayName>
<Description xsi:nil="true"></Description>
<CommitMessage xsi:nil="true"></CommitMessage>
<Publisher xsi:nil="true"></Publisher>
<AuthorizationReferences>[]</AuthorizationReferences>
<ConnectionReferences>{}</ConnectionReferences>
<DatabaseReferences>{}</DatabaseReferences>
<AppComponents>[{"appComponentName":"d1affd95fa2c457ea1b1047bdd2dc79a","displayName":"UserDefinedFunctions","appName":"a3b3c51c-56a3-4834-bfad-6dd2409a7a84","appVersion":"2024-03-17T13:10:16Z","appComponentLibraryLogicalName":"sa_userdefinedformulasregularexpressionvalidations_8b660","appDisplayName":"User Defined Formulas - Regular Expression Validations","environmentName":"3466824b-1fef-ef36-add8-745f90acc09b","owner":{"id":"43de01ce-6d63-46ed-8422-c3907d0a3fff","displayName":"Shaheer Ahmed","email":"[email protected]","type":"User","tenantId":"083e7bcf-c004-4c50-aa51-8b5a4d3a4771","userPrincipalName":"[email protected]"},"allowCustomization":true,"createdOn":"2024-03-17T10:30:55.739Z","lastModifiedOn":"2024-03-17T13:09:12.379Z","connectionReferences":{},"databaseReferences":{}}]</AppComponents>
<AppComponentDependencies>[]</AppComponentDependencies>
<CanConsumeAppPass>1</CanConsumeAppPass>
<CanvasAppType>1</CanvasAppType>
<BypassConsent>0</BypassConsent>
<AdminControlBypassConsent>0</AdminControlBypassConsent>
<EmbeddedApp xsi:nil="true"></EmbeddedApp>
<IntroducedVersion>1.0</IntroducedVersion>
<CdsDependencies>{"cdsdependencies":[]}</CdsDependencies>
<IsCustomizable>1</IsCustomizable>
<BackgroundImageUri>/CanvasApps/sa_userdefinedformulasregularexpressionvalida31459_BackgroundImageUri</BackgroundImageUri>
<DocumentUri>/CanvasApps/sa_userdefinedformulasregularexpressionvalida59232_DocumentUri.msapp</DocumentUri>
<AdditionalUris>
<AdditionalUri>/CanvasApps/sa_userdefinedformulasregularexpressionvalida13250_AdditionalUris0_identity.json</AdditionalUri>
</AdditionalUris>
</CanvasApp>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"Content": "Image",
"FileName": "/ctrllib/image/images/SampleImage.svg",
"IsSampleData": true,
"IsWritable": false,
"Name": "SampleImage",
"Path": "/ctrllib/image/images/SampleImage.svg",
"ResourceKind": "Uri",
"RootPath": "ms-appx:///ctrllib/image/images/SampleImage.svg",
"Schema": "i",
"Type": "ResourceInfo"
}
Loading

0 comments on commit 805d6f6

Please sign in to comment.