initial
This commit is contained in:
commit
74ae93a96e
3 changed files with 94691 additions and 0 deletions
|
|
@ -0,0 +1,40 @@
|
|||
Setup
|
||||
- use cdn
|
||||
include link and script tags with their links
|
||||
- with syncfusion
|
||||
https://ej2.syncfusion.com/aspnetcore/documentation/getting-started/vscode : important
|
||||
https://help.syncfusion.com/aspnet-core/gettingstarted/getting-started-2-0
|
||||
https://ej2.syncfusion.com/aspnetcore/documentation/nuget-packages
|
||||
to be downloaded from here
|
||||
https://www.nuget.org/packages/Syncfusion.EJ2.AspNet.Core/
|
||||
- licensing
|
||||
- to validate it with license, 2 ways
|
||||
1. entry point file
|
||||
```cs
|
||||
using Syncfusion.Licensing;
|
||||
|
||||
public class Startup
|
||||
{
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
// Register the Syncfusion license
|
||||
SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY"); // Replace with your actual license key
|
||||
|
||||
// Other service registrations
|
||||
services.AddControllersWithViews();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
// Existing code for middleware configuration...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. in razor pages
|
||||
```cshtml
|
||||
@using Syncfusion.Licensing
|
||||
@{
|
||||
SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY"); // Replace with your actual license key
|
||||
}
|
||||
```
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
tips
|
||||
|
||||
- whenever using row, it is recommended to use `m-0` to remove unpredicatable margin.
|
||||
- tabs approach : either spaces between them or white background wit opacity 0.1 to 0.3.
|
||||
https://youtu.be/7vVDxpCY7YY
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
validation
|
||||
|
||||
- for browser default validation for no custom validation rules use something like this
|
||||
```html
|
||||
<form class="needs-valiation">
|
||||
<input type="text" required>
|
||||
</form>
|
||||
```
|
||||
|
||||
```js
|
||||
const forms = document.querySelectorAll(".needs-validation");
|
||||
|
||||
// Loop over them and prevent submission
|
||||
Array.from(forms).forEach((form) => {
|
||||
form.querySelector("input").addEventListener("blur", (e) => {
|
||||
console.log("detected");
|
||||
form.classList.add("was-validated");
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
form.addEventListener("submit", (event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
console.log("submit listened");
|
||||
// event.preventDefault();
|
||||
// if (!form.checkValidity()) {
|
||||
// console.log("preventing default");
|
||||
// event.preventDefault();
|
||||
// event.stopPropagation();
|
||||
// }
|
||||
|
||||
// form.classList.add("was-validated");
|
||||
});
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
|
||||
Using custom rules for validation
|
||||
Loading…
Reference in a new issue